Closed bansalvks closed 8 years ago
@bansalvks could you try the workaround mentioned here and let us know if that works for you?
it worked. Thanks @johnmuhl
Installed for an afternoon also did not solve this mistake, it does not seem to be a special case, this error is very common
`D:\nodejs>npm install electron -g
d:\nodejs\nodeGlobal\electron -> d:\nodejs\nodeGlobal\node_modules\electron\cli.js
> core-js@3.6.5 postinstall d:\nodejs\nodeGlobal\node_modules\electron\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> electron@8.2.5 postinstall d:\nodejs\nodeGlobal\node_modules\electron
> node install.js
d:\nodejs\nodeGlobal\node_modules\electron\install.js:51
throw err
^
Error: end of central directory record signature not found
at d:\nodejs\nodeGlobal\node_modules\electron\node_modules\yauzl\index.js:187:14
at Immediate.<anonymous> (d:\nodejs\nodeGlobal\node_modules\electron\node_modules\yauzl\index.js:624:38)
at processImmediate (internal/timers.js:456:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@8.2.5 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@8.2.5 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! d:\nodejs\nodeCache\_logs\2020-05-10T12_42_44_138Z-debug.log`
I am running the following npm command npm install electron-prebuilt --save-dev
provided on https://www.npmjs.com/package/electron-prebuilt
Following is the result that is begotten
C:\Users\vikas\Desktop\electron apps\example>npm install electron-prebuilt --sa ve-dev
C:\Users\vikas\Desktop\electron apps\example\node_modules\electron-prebuilt\ins tall.js:22 throw err ^
Error: end of central directory record signature not found at C:\Users\vikas\Desktop\electron apps\example\node_modules\yauzl\index.js :167:14 at C:\Users\vikas\Desktop\electron apps\example\node_modules\yauzl\index.js :473:5 at C:\Users\vikas\Desktop\electron apps\example\node_modules\fd-slicer\inde x.js:32:7 at FSReqWrap.wrapper as oncomplete npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\vikas\Desktop \electron apps\example\package.json' npm WARN example No description npm WARN example No repository field. npm WARN example No README data npm WARN example No license field. npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\vikas\AppData\ \Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "electron-prebuilt" "--save-dev" npm ERR! node v4.4.3 npm ERR! npm v3.8.9 npm ERR! code ELIFECYCLE
npm ERR! electron-prebuilt@0.37.8 postinstall:
node install.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron-prebuilt@0.37.8 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-prebuilt pac kage, 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-prebuilt npm ERR! Or if that isn't available, 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\vikas\Desktop\electron apps\example\npm-debug.log
C:\Users\vikas\Desktop\electron apps\example>