2017-07-17 34 views
0

我試過的WebPack安裝到使用此命令一個項目的現有目錄:如何將Webpack安裝到現有的Angular應用程序中?

npm install --save-dev webpack 

但是,它返回以下錯誤:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules\chokidar\node_modules\fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 
npm WARN [email protected] requires a peer of [email protected]^2.2.0 but none was installed. 
npm WARN [email protected] requires a peer of [email protected]^2.2.0 but none was installed. 

我該如何解決這個問題,並安裝的WebPack?

回答

1

看來你是在Win32根據

wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}

嘗試更新您的節點/ NPM版本運行此。

檢出節點的版本管理器。對於Windows,您可以嘗試this one

編輯:

作者沒有迴應。 東西試過可能已經工作:

npm install -f 
npm install [email protected] 
+0

是的,我運行在Win64上。所以,我有最新的版本節點。接下來是什麼? – OPV

+0

嘗試使用'npm install -f'重新安裝以覆蓋存在的文件 –

+0

這裏有一個關於這個問題的想法:https://github.com/angular/angular/issues/13935 – OPV

相關問題