【问题标题】:Error code 128 when trying to install packages with npm尝试使用 npm 安装软件包时出现错误代码 128
【发布时间】:2019-11-03 03:09:44
【问题描述】:

当我尝试npm install jspdf --save 时收到以下错误:

npm ERR! code 128
npm ERR! Command failed: git submodule update -q --init --recursive
npm ERR! error: waitpid for git-submodule failed: No child processes

我安装了最新版本的 npm 还是一样:

Angular CLI: 6.2.3
Node: 10.16.0
OS: win32 x64
Angular: 6.1.9
NPM: 6.9.0

知道是什么原因造成的吗?

【问题讨论】:

  • 删除位于 c:\myUser\AppData\Roaming 中的 npm 和 npm-cache 目录。然后,执行 npm install -g npm。
  • @DhavalPatel 我刚刚做了同样的问题。这是为了安装最新版本的 npm 而我的是最新的。

标签: angular npm npm-install


【解决方案1】:

如果是 Windows,请尝试以管理员身份运行应用程序(右键单击 -> 以管理员身份运行)。

【讨论】:

  • 它解决了我的问题。我刚刚以管理员身份打开了 cmd,然后尝试了npm install jspdf --save,它成功了。谢谢!
猜你喜欢
  • 2016-11-23
  • 2022-12-05
  • 2021-07-25
  • 1970-01-01
  • 1970-01-01
  • 2016-05-03
  • 1970-01-01
  • 1970-01-01
  • 2022-01-13
相关资源
最近更新 更多