2017-07-17 83 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

相关问题