Npm ERR! Failed at the electron@1.4.6 postinstall script 'node install.js'


#1

Hello,
I’ve tried electron for the first time last night and am getting errors.
I updated to the latest version of node.js and npm and still got errors.
I deleted my “electron-quick-start” directory and tried again, using npm install --loglevel verbose and got this log. The error is listed below:

npm ERR! Windows_NT 10.0.14393
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” “–loglevel” "verbose"
npm ERR! node v7.1.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! electron@1.4.6 postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.4.6 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.
npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support request:
npm ERR! J:\electron\electron-quick-start\npm-debug.log


#2

Hi. I also encountered this error. I tried to change the electron version on package.json to 1.4.5 and it works.


#3

It seems like 1.4.6 electron is not compatible with node 7.1


#4

Was using Nodejs 7. Downgraded to version 6 and everything works so far.


#5

Now that it’s installed, what happens if you re-upgrade to Nodejs 7?

(I’ve started using NVM for situations like this…)


#6

I am getting the same error. I have tried installing electron with node v6.9.3 and v6.3.0 but the error persists… :frowning:

The debug logs are as follows:
14373 error Windows_NT 10.0.10586
14374 error argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” "electron"
14375 error node v6.9.3
14376 error npm v3.10.10
14377 error code ELIFECYCLE
14378 error electron@1.4.14 postinstall: node install.js
14378 error Exit status 1
14379 error Failed at the electron@1.4.14 postinstall script ‘node install.js’.
14379 error Make sure you have the latest version of node.js and npm installed.
14379 error If you do, this is most likely a problem with the electron package,
14379 error not with npm itself.
14379 error Tell the author that this fails on your system:
14379 error node install.js
14379 error You can get information on how to open an issue for this project with:
14379 error npm bugs electron
14379 error Or if that isn’t available, you can get their info via:
14379 error npm owner ls electron
14379 error There is likely additional logging output above.
14380 verbose exit [ 1, true ]

Any help will be highly appreciated.


#7

Can you please explain how to tell electron to use version 1.4.5?
Many thanks in advance :slight_smile: