我正在尝试使用https://github.com/avatarkava/beavisbot-dubtrack-fm/tree/f302f4a278ca308027c05f52c3c0dd30f72a2e60。正如我在阅读中读到的那样,我在使用Windows PowerShell的根文件夹中运行NPM install
,并且它返回了这些错误:
PS C:\Users\Ryan> cd desktop
PS C:\Users\Ryan\desktop> cd plug
PS C:\Users\Ryan\desktop\plug> npm install
npm WARN package.json BeavisBot@2.0.0 No license field.
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:63:19)
npm WARN addRemoteGit at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:72:29)
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:81:16
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\index.js:44:5
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:29:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:82:15)
npm WARN addRemoteGit git://github.com/jpravetz/node-datatable.git resetting remote C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-jpravetz-node-datatable-git-1942cdb7 because of error: { [Error: not found: git] code: 'ENOGIT' }
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:63:19)
npm WARN addRemoteGit at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:72:29)
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:81:16
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\index.js:44:5
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:29:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:82:15)
npm WARN addRemoteGit git://github.com/AvatarKava/cleverbot-node.git resetting remote C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-AvatarKava-cleverbot-node-git-2c5ade26 because of error: { [Error: not found: git] code: 'ENOGIT' }
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:63:19)
npm WARN addRemoteGit at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:72:29)
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:81:16
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\index.js:44:5
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:29:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:82:15)
npm WARN addRemoteGit git://github.com/plugCubed/plugAPI.git resetting remote C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-plugCubed-plugAPI-git-570cfe8a because of error: { [Error: not found: git] code: 'ENOGIT' }
npm ERR! git clone --template=C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/plugCubed/plugAPI.git C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-plugCubed-plugAPI-git-570cfe8a: undefined
npm ERR! git clone --template=C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/plugCubed/plugAPI.git C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-plugCubed-plugAPI-git-570cfe8a: undefined
npm ERR! git clone --template=C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/jpravetz/node-datatable.git C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-jpravetz-node-datatable-git-1942cdb7: undefined
npm ERR! git clone --template=C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/jpravetz/node-datatable.git C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-jpravetz-node-datatable-git-1942cdb7: undefined
npm ERR! git clone --template=C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/AvatarKava/cleverbot-node.git C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-AvatarKava-cleverbot-node-git-2c5ade26: undefined
npm ERR! git clone --template=C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/AvatarKava/cleverbot-node.git C:\Users\Ryan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-AvatarKava-cleverbot-node-git-2c5ade26: undefined
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.0
npm ERR! npm v2.14.20
npm ERR! code ENOGIT
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Ryan\desktop\plug\npm-debug.log
PS C:\Users\Ryan\desktop\plug>
我尝试过运行npm install
几次以查看它是否是一次性错误,但我每次都得到同样的事情。
另外,如果这更容易在不同的操作系统上运行而不是虚拟机让我知道。
答案 0 :(得分:4)
错误告诉您没有安装git
并且位于您的路径上。 npm想要致电git
,因此您需要安装它并将其放在PATH上以解决此问题:
https://git-scm.com/download/win
更新:
您可以转到开始菜单并搜索“路径”,然后“编辑帐户的环境变量”来修改PATH。添加的路径应该是git安装路径,很可能是C:\ Program Files \ Git \ bin;
如果您的路径不同,请尝试在目录资源管理器中查找。