【发布时间】:2020-08-11 23:26:17
【问题描述】:
我正在尝试关注此tutorial 以启动 twitch 播放节点服务器。我安装了 node.js。我转到 node.js 命令提示符,CD 到包含教程中我 downloaded 的所有信息的文件夹,按照教程中的说明键入 npm install ,我收到此错误:
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/martynsmith/node-irc.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
错误日志:here (Download)
【问题讨论】:
-
你的系统上安装了 git 吗?我认为在执行 npm install 之前您需要在这里
-
不,我没有安装,现在就安装。
-
是的,请安装它。不要忘记将其添加到路径环境变量中。那你可以走了。
-
@vipulw 我只是将 git bash exe 添加到变量中吗?我将 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git 添加到变量列表中
-
那是您的安装位置吗?在那里添加你的 git 安装位置。尝试在 cmd 中执行
git -v。
标签: javascript node.js npm package