Javascript 如何从github repo安装NodeJS包

Javascript 如何从github repo安装NodeJS包,javascript,node.js,Javascript,Node.js,我正在尝试从github repo安装程序包,但收到以下消息: npm ERR! Darwin 15.6.0 npm ERR! argv "/Users/z0019rb/.nvm/versions/node/v4.4.7/bin/node" "/Users/z0019rb/.nvm/versions/node/v4.4.7/bin/npm" "install" npm ERR! node v4.4.7 npm ERR! npm v2.15.8 npm ERR! code E404 npm E

我正在尝试从github repo安装程序包,但收到以下消息:

npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/z0019rb/.nvm/versions/node/v4.4.7/bin/node" "/Users/z0019rb/.nvm/versions/node/v4.4.7/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/target-digital-design-tokens
npm ERR! 404
npm ERR! 404 'target-digital-design-tokens' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'target-base-pattern-library'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/z0019rb/dev/design-systems/designsystems-site/npm-debug.log
"git+https://target.com/design-systems/design-tokens"
这就是my package.json的外观:

"target-digital-design-tokens": "git+ssh://git@git.target.com:design-systems/design-tokens.git"
"git+https://target.com/design-systems/design-tokens"

不知道我做错了什么。我尝试安装的repo有一个package.json。谢谢

试试这个:

"git+https://target.com/design-systems/design-tokens"
不要忘记在package.json中设置git repo,如下所示:

"repository": {
    "type": "git",
     "url": "git@target.com:design-systems/design-tokens.git"
 },
如果git服务器位于代理之后,请不要忘记在npm安装之前设置env
http\u proxy
,如下所示:

npm config set proxy "http://domain......@myproxy:8080"
npm config set https-proxy "http://domain......@myproxy:8080"

请尝试以下方法:

"git+https://target.com/design-systems/design-tokens"
不要忘记在package.json中设置git repo,如下所示:

"repository": {
    "type": "git",
     "url": "git@target.com:design-systems/design-tokens.git"
 },
如果git服务器位于代理之后,请不要忘记在npm安装之前设置env
http\u proxy
,如下所示:

npm config set proxy "http://domain......@myproxy:8080"
npm config set https-proxy "http://domain......@myproxy:8080"

您使用什么命令来安装?package.json条目看起来不错。您是否仅使用https进行了尝试?npm安装我认为这是源代码的问题,无法访问野生猜测:在
git.target.com
之后尝试
/
而不是
?我正在执行
npm安装
来安装。我试着使用https,但不起作用。我已经尝试了所有这些选项。最奇怪的是,即使从package.json中删除这个包,npm也会尝试安装它,但它在我的package.json文件中没有引用。这怎么可能?您使用什么命令来安装?package.json条目看起来不错。您是否仅使用https进行了尝试?npm安装我认为这是源代码的问题,无法访问野生猜测:在
git.target.com
之后尝试
/
而不是
?我正在执行
npm安装
来安装。我试着使用https,但不起作用。我已经尝试了所有这些选项。最奇怪的是,即使从package.json中删除这个包,npm也会尝试安装它,但它在我的package.json文件中没有引用。怎么可能呢?这似乎不管用。有趣的是,它以前是有用的,我没有改变任何东西。这似乎不起作用。有趣的是,它以前是有用的,我没有改变任何东西。