2016-09-28 171 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。它將運行沒有任何問題。