无法在本地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 但他们都没有解决我的问题。有人可以帮忙吗?

2 个答案:

答案 0 :(得分:0)

尝试一下:

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

答案 1 :(得分:0)

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