【问题标题】:Fail to run npm install on local angular project无法在本地 Angular 项目上运行 npm install
【发布时间】:2019-12-07 09:50:54
【问题描述】:

每次我在本地 Angular 项目上运行 npm install 时,都会收到以下错误:

C:\Projects\Angular>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/pemrouz/buble.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:
npm ERR!     C:\Users\elbal\AppData\Roaming\npm-cache\_logs\2019-12-07T09_45_08_860Z-debug.log

我运行的是 Windows 10 Home 64 位操作系统,具有以下功能:

C:\Windows\system32>node -v
v12.13.1

C:\Windows\system32>npm -v
6.13.2

Angular CLI: 8.3.2
Node: 12.13.1
OS: win32 x64
Angular: 8.2.4

我遵循了各种帖子中的解决方案,例如: npm local install fails on first try npm ERR! Windows_NT 6.1.7601: ENOENT: no such file or directory Error: npm install -g angular-cli | npm ERR! Windows_NT 10.0.10586 但他们都没有解决我的问题。有人可以帮忙吗?

【问题讨论】:

标签: angular


【解决方案1】:

试试这个:

cd C:\Projects\Angular
git clone https://github.com/pemrouz/buble.git
cd buble
npm install

【讨论】:

    【解决方案2】:

    尝试删除 package-lock.json,然后再次运行 npm install。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-05-03
      • 1970-01-01
      • 2022-07-22
      • 2015-08-25
      • 1970-01-01
      • 2016-02-07
      • 2016-02-09
      相关资源
      最近更新 更多