Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed at the [email protected] postinstall script

Tags:

npm

electron

I was trying to install electron into my project, but it is giving an error. I also tried to do this with unsafe-perm, but still giving the same error.

npm install electron --save-dev --save-exact

> [email protected] postinstall E:\PrgLang\Electron\crypto-app\node_modules\electron
> node install.js

Downloading electron-v1.8.2-win32-x64.zip
[============================================>] 100.0% of 55.21 MB (1.51 MB/s)
E:\PrgLang\Electron\crypto-app\node_modules\electron\install.js:47
throw err
^

Error: Could not parse checksum file at line 1:
at new ChecksumParseError (E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:71:127)
at E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:130:20
at Array.forEach (<anonymous>)
at E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:125:38
at new Promise (<anonymous>)
at ChecksumValidator.parseChecksumFile (E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:121:14)
at <anonymous>
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Harshit\AppData\Roaming\npm-cache\_logs\2018-02-11T03_33_52_399Z-debug.log
like image 707
HARSHIT KUMAR SINGH Avatar asked Sep 11 '25 20:09

HARSHIT KUMAR SINGH


1 Answers

Can you please try(after removing node_modules)

sudo npm install electron --save-dev --save-exact --unsafe-perm=true --allow-root

I was running into the same error and this is what worked for me.

like image 65
Anshuman Verma Avatar answered Sep 13 '25 09:09

Anshuman Verma