2016-09-28 172 views
4

我在Windows 10系统上安装了angular-cli的安装问题。 这些错误与Python依赖关系和node-gyp有关。东西如下:在Windows 10上安装Angular-CLI 10

>[email protected] install C:\Users\UserName\AppData\Roaming\npm\node_modules\angular-cli\node_modules\execSync 
node install.js 
[execsync v1.0.2] Attempting to compile native extensions. 
{ Error: spawn node-gyp ENOENT 
at exports._errnoException (util.js:1007:11) 
+0

请回答你的问题,而不是把问题的解决方案:) –

+0

我已经删除了你的答案,添加它作为一个单独的答案。请参阅http://stackoverflow.com/help/self-answer –

回答

2

更新

这似乎是固定在新版本中,不再需要此解决方案。


因为mukesh51不回答了自己的问题和Bhargav饶移除了问题本身mukesh51的回答,我在这里把答案:

安装似乎在这些步骤的工作:

  1. npm install -g node-gyp
  2. npm install -g windows-build-tools
  3. npm install -g @angular/cli

我从here采取了这些步骤。

3

卸载

npm uninstall -g angular-cli 
npm uninstall --save-dev angular-cli 

更新全球包装

npm uninstall -g @angular/cli 
npm cache clean 
npm install -g @angular/[email protected] 
+1

欢迎来到SO。您应该将代码格式化为便于阅读和解释答案的代码。 – Buts

1

使用Windows电源外壳安装角CLI。它将运行没有任何问题。