我有奇怪的问题,我可以在linux机器上构建并运行命令npm install
但是当我尝试在Windows 10 OS上运行时我的错误日志在下面
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\puszka\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install' ]
2 info using npm@5.5.1
3 info using node@v8.8.0
4 verbose npm-session c88843dd32c85215
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall angular-app@0.0.0
7 info lifecycle angular-app@0.0.0~preinstall: angular-app@0.0.0
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 silly install loadShrinkwrap
13 info lifecycle @angular/cdk@2.0.0-beta.10-f375f92~prepack: @angular/cdk@2.0.0-beta.10-f375f92
14 error cb() never called!
15 error This is an error with npm itself. Please report this error at:
16 error <https://github.com/npm/npm/issues>
我检查并确认我是否在路径C:\Users\puszka\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-56cb57f2\angular\cdk.es5.js
下有任何文件我没有任何文件,但是npm创建了名为@angular
的文件夹而没有angular
所以如果有的话这样的路径C:\Users\puszka\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-56cb57f2\@angular\cdk.es5.js
一切都会很完美,但我不知道该怎么做。
答案 0 :(得分:0)
据我了解你的问题,
1)Check node -v installed or install it.
2)Install npm install -g @angular/cli and check ng -v.
3)Check npm -v.
Then after creating project run `npm install`.
如果先安装,可以尝试卸载,然后重新安装。