2016-11-15 96 views
2

我試圖安裝電子最新版本並遇到此錯誤。我嘗試安裝sudo並降級到電子版1.4.5,但是此錯誤仍然存​​在。我使用的節點版本是v7.1.0電子安裝錯誤:在[email protected]安裝後失敗腳本'節點install.js'

完全錯誤日誌

npm ERR! Darwin 16.1.0 
npm ERR! argv "/usr/local/Cellar/node/6.6.0/bin/node" "/usr/local/bin/npm" "install" "-g" "[email protected]" "--verbose" 
npm ERR! node v6.6.0 
npm ERR! npm v3.10.7 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] postinstall: `node install.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node install.js'. 
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 electron package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node install.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs electron 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls electron 
npm ERR! There is likely additional logging output above. 

回答

1

它竟然是用node版本我使用的一個問題。電子可能與發佈的較新版本的節點不兼容。

我安裝了nvm並安裝了較低版本的節點。在我的情況下,v6.3.0。之後,我能夠無誤地安裝電子。

相關問題