从Github安装的NPM,含糊不清的说法

我正试图从一个私人的github回购安装。 前3个私人存储库安装得很好。 最后一个错误输出如下所示的错误。 我有权访问,从和推回购买。 我已经尝试删除版本号,但我得到了与“模棱两可的论点”主“相同的错误”。 其他3个存储库的安装命令格式相同。

PS C:\Users\shutez\Documents\Simple Emotion\Code\sedemo.tk> npm install git+ssh://git@github.com:SimpleEmotion/node-call -analytics.git#0.4.1 npm ERR! Failed resolving git HEAD (git@github.com:SimpleEmotion/node-call-analytics.git) fatal: ambiguous argument '0.4 .1': unknown revision or path not in the working tree. npm ERR! Failed resolving git HEAD (git@github.com:SimpleEmotion/node-call-analytics.git) Use '--' to separate paths fro m revisions, like this: npm ERR! Failed resolving git HEAD (git@github.com:SimpleEmotion/node-call-analytics.git) 'git <command> [<revision>...] -- [<file>...]' npm ERR! Failed resolving git HEAD (git@github.com:SimpleEmotion/node-call-analytics.git) npm ERR! Error: Command failed: fatal: ambiguous argument '0.4.1': unknown revision or path not in the working tree. npm ERR! Use '--' to separate paths from revisions, like this: npm ERR! 'git <command> [<revision>...] -- [<file>...]' npm ERR! npm ERR! at ChildProcess.exithandler (child_process.js:647:15) npm ERR! at ChildProcess.EventEmitter.emit (events.js:98:17) npm ERR! at maybeClose (child_process.js:753:16) npm ERR! at Process.ChildProcess._handle.onexit (child_process.js:820:5) npm ERR! If you need help, you may report this *entire* log, npm ERR! including the npm and node versions, at: npm ERR! <http://github.com/npm/npm/issues> npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "git+ssh://git@github.com:SimpleEmotion/node-call-analytics.git#0.4.1" npm ERR! cwd C:\Users\shutez\Documents\Simple Emotion\Code\sedemo.tk npm ERR! node -v v0.10.28 npm ERR! npm -v 1.4.9 npm ERR! code 128 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\Users\shutez\Documents\Simple Emotion\Code\sedemo.tk\npm-debug.log npm ERR! not ok code 0 

你的修复很简单。

$ npm update -g npm

你的npm已经过时了。 你的日志说你正在使用1.4.9,最新版本是2.11.0。

干杯!

回购不存在

我碰到这个,因为我试图做一个npm install项目,我没有碰到一会儿, package.json文件引用了一个已被删除的存储库。

在我的具体情况,这是我的package.json文件中导致该问题的以下行:

 "react-native-app-intro": "joshuapinter/react-native-app-intro#patch-1", 

你可以看到我试图拉取资源库的patch-1分支。

那么这个分支实际上就是我创build的一个对原始作者的合并请求,在原始作者合并到合并请求之后,我本能地删除了不再需要的patch-1分支。 但是我没有更新我的package.json文件来引用原作者的存储库和我的合并更改。

无论如何,非常神秘的错误消息,npm吐出多么简单和普通,这一定是,但希望这可以帮助别人节省一些时间。