2016-11-16 29 views
1

我無法安裝ol3-contextmenu無法安裝ol3-contextmenu

當我執行如下:

npm install ol3-contextmenu --save 

我得到以下錯誤:

ERR! closure-util connect ECONNREFUSED 216.58.199.174:80 ..... ..... npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: [email protected] npm ERR! Windows_NT 10.0.10586 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "ol3-contextmenu" "--save" npm ERR! node v6.2.0 npm ERR! npm v3.8.9 npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node ./bin/closure-util.js update npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script 'node ./bin/closure-util.js update'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the closure-util package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./bin/closure-util.js update npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs closure-util npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls closure-util npm ERR! There is likely additional logging output above.

回答

0

嘗試使用--no-optional標誌作爲一種解決方法。

npm update --no-optional

+0

不幸運!我試過「npm install ol3-contextmenu --no-optional」,「npm install ol3-contextmenu update --no-optional」。沒有工作!獲取錯誤 – user6730740

+0

@ user6730740你正在得到什麼錯誤? –

+0

錯誤! closure-util connect ECONNREFUSED 192.30.253.112:443 + - UNMET PEER DEPENDENCY @ angular/common @ 2.0.1 '--UNMET PEER DEPENDENCY @ angular/core @ 2.0.1 npm ERR! Windows_NT 10.0.10586 npm ERR! argv「C:\\ Program Files \\ nodejs \\ node.exe」「C:\\ Program Files \\ nodejs \\ node_modules \\ npm \\ bin \\ npm-cli.js」「install」「ol3- contextmenu「」--no-optional「 npm ERR! node v6.2.0 npm ERR! npm v3.8.9 npm ERR!代碼ELIFECYCLE npm ERR! [email protected] postinstall:'。節點./bin/closure-util.js更新' npm ERR!在[email protected] postinstall腳本'節點./bin/closure-util.js更新'失敗。 – user6730740