【问题标题】:NPM package not installing for tpp project没有为 tpp 项目安装 NPM 包
【发布时间】: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


【解决方案1】:

从这里安装 gitbash - https://gitforwindows.org/ 并在其中运行 npm install - 看看这是否适合您。

执行 cd "~documents/mde/frontmission" 并执行 npm install

【讨论】:

  • 当我尝试 cd 到 git bash 中的文件夹时,它告诉我“参数太多”
  • 你能分享截图吗?也只需安装 git 并将其添加到环境中。变种在您的系统中。
  • 我认为您的路径中有带空格的文件夹,请尝试在路径示例中添加双引号:cd "c:\temp dir\temp dir2\your web app"
  • 执行 cd "~documents/mde/frontmission" 并执行 npm install
  • 好的,所以它安装了我认为的软件包,使用 npm install。但是现在当我运行“npm start”时,它给了我这个错误:mega.nz/file/…
猜你喜欢
  • 2020-12-26
  • 2018-05-25
  • 1970-01-01
  • 2023-03-27
  • 1970-01-01
  • 2020-09-17
  • 1970-01-01
  • 2023-01-01
  • 1970-01-01
相关资源
最近更新 更多