3

When i am installing Electron using npm install electron-prebuilt --save-dev, I am getting the following error:

 Error: end of central directory record signature not found
     at C:\Users\madhava\Desktop\New folder\node_modules\electron-prebuilt\node_modules\extract-zip\node_modules\yauzl\index.js:98:14
     at C:\Users\madhava\Desktop\New folder\node_modules\electron-prebuilt\node_modules\extract-zip\node_modules\yauzl\index.js:342:5
     at C:\Users\madhava\Desktop\New folder\node_modules\electron-prebuilt\node_modules\extract-zip\node_modules\yauzl\node_modules\fd-slicer\index.js:32:7
     at FSReqWrap.wrapper [as oncomplete] (fs.js:527:17)
 npm ERR! Windows_NT 6.1.7600
 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
 \\node_modules\\npm\\bin\\npm-cli.js" "install" "electron-prebuilt" "--save-dev"

 npm ERR! node v0.12.4
 npm ERR! npm  v2.10.1
 npm ERR! code ELIFECYCLE

 npm ERR! electron-prebuilt@0.27.3 postinstall: `node install.js`
 npm ERR! Exit status 1
 npm ERR!
 npm ERR! Failed at the electron-prebuilt@0.27.3 postinstall script 'node install
 .js'.
 npm ERR! This is most likely a problem with the electron-prebuilt 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 their info via:
 npm ERR!     npm owner ls electron-prebuilt
 npm ERR! There is likely additional logging output above.

 npm ERR! Please include the following file with any support request:
 npm ERR!     C:\Users\madhava\Desktop\New folder\npm-debug.log
maowtm
  • 1,982
  • 1
  • 18
  • 22
Hussian Shaik
  • 2,559
  • 9
  • 37
  • 57

3 Answers3

4

I had this problem when trying to install on a dodgy connection, which meant I had some bad zips left over. Solution was (on OSX at least to remove the ~/.electron folder, and run npm install electron-prebuilt again. Not sure where the zips get saved to on Windows though.

Pezholio
  • 2,439
  • 5
  • 27
  • 41
  • cheers bro, nice one, i saw my packets receiving drop to ~42kbps and i became suspicious. did what you did, all fixed. – danjah May 13 '16 at 06:44
  • The install script didn't download the full zip file on my box, like some bytes are dropped near the end of the file. For those who still get this error after retrying, you can download the zip directly from [github](https://github.com/electron/electron/releases) and place it into your `~/.electron`. – maowtm Jul 22 '16 at 09:16
0

This is error is because the version of glibc on your host is too old for some of electron's dependencies. Looks like you're using Windows. I ran into this issue with Debian Wheezy The only solution I found was to install a newer version of glibc via this hack:

How to upgrade glibc from version 2.13 to 2.15 on Debian?

You'll need to do something similar with windows.

gflarity
  • 191
  • 2
  • 2
0

I had the same issue when i was installing electron globally.here is what i did

rm -rf ~/.electron/
rm -rf ~/.atom/
npm cache clear
npm install

after this I ran the command again..

npm install electron -g

if this doesn't work,you can use the prebuilt version

npm install electron-prebuilt

Here is the resource i used..

Slycreator
  • 1,144
  • 11
  • 18