Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

npm install on Windows: Error: end of central directory record signature not found #69

Closed
jwefers opened this issue Nov 19, 2015 · 10 comments

Comments

@jwefers
Copy link

jwefers commented Nov 19, 2015

Hi, this happens during npm install -g for 0.35.0 on Win10:
capture

@JudyHsiao
Copy link

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

=> this work for me

@vickism
Copy link

vickism commented Dec 17, 2015

Still an issue, but the workaround by Judy worked.

@jwefers
Copy link
Author

jwefers commented Jan 12, 2016

yep, works, thanks

@ovidiubuligan
Copy link

ovidiubuligan commented May 12, 2016

I was trying this to build https://github.com/electron/electron-api-demos on windows 7.
Also tried the workaround mentioned by @JudyHsiao and I get:

77987 verbose stack Error: electron-prebuilt@1.0.1 postinstall: `node install.js`
77987 verbose stack Exit status 1
77987 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16)
77987 verbose stack     at emitTwo (events.js:106:13)
77987 verbose stack     at EventEmitter.emit (events.js:191:7)
77987 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
77987 verbose stack     at emitTwo (events.js:106:13)
77987 verbose stack     at ChildProcess.emit (events.js:191:7)
77987 verbose stack     at maybeClose (internal/child_process.js:850:16)
77987 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
77988 verbose pkgid electron-prebuilt@1.0.1
77989 verbose cwd c:\PRJ\Temp\Electron_Api_Explorer\electron-api-demos
77990 error Windows_NT 6.1.7601
77991 error argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
77992 error node v6.1.0
77993 error npm  v3.8.6
77994 error code ELIFECYCLE
77995 error electron-prebuilt@1.0.1 postinstall: `node install.js`
77995 error Exit status 1
77996 error Failed at the electron-prebuilt@1.0.1 postinstall script 'node install.js'.
77996 error Make sure you have the latest version of node.js and npm installed.
77996 error If you do, this is most likely a problem with the electron-prebuilt package,
77996 error not with npm itself.
77996 error Tell the author that this fails on your system:
77996 error     node install.js
77996 error You can get information on how to open an issue for this project with:
77996 error     npm bugs electron-prebuilt
77996 error Or if that isn't available, you can get their info via:
77996 error     npm owner ls electron-prebuilt
77996 error There is likely additional logging output above.
77997 verbose exit [ 1, true ]

Do you have any clues?

@ovidiubuligan
Copy link

ovidiubuligan commented May 12, 2016

Ignore my previews post . It works now
The problem with that error log was that I was using proxies and I had different values for proxy and http-proxy.
I was using a proxy with username and password
http://myuser:mypas$@proxy.company.com:3128 (proxy setting) and for the https-proxy setting I was escaping the dollar sign http://myuser:mypas\\$@proxy.company.com:3128 .
Still from the error It was pretty hard to direct the search.

@brianmaher84
Copy link

brianmaher84 commented May 18, 2016

It works for me but this is still happening on OSX.
Maybe the work around can be included in script error output as I only got here via a duplicate bug that links to here from another users post.

@LimaniBhavik
Copy link

image

not resolved help me step by step
install node, install electron, and run hello desktop app... thanks

@LimaniBhavik
Copy link

LimaniBhavik commented Aug 12, 2016

package.json
{
  "name":    "demo",
  "version": "0.0.1",
  "main":    "main.js",
  "scripts": {
    "start": "electron main.js"
  }
}
main.js
const app = require('app');
const BrowserWindow = require('browser-window');

app.on('window-all-closed', function() {
  if (process.platform != 'darwin') {
    app.quit();
  }
});

let mainWindow = null;
app.on('ready', function() {
  mainWindow = new BrowserWindow({width: 800, height: 600});
  mainWindow.loadUrl('http://www.google.com');
  mainWindow.on('closed', function() {
    mainWindow = null;
  });
});

Run just > electron
image

Run >npm start
image

@sencis82
Copy link

There is allways a chance to pick up installation from the point it was interrupted. Just Ctrl+C when it hangs on "node install.js" so that /node_modules/electron/ was not deleted by script; Then navigate to /node_modules/electron/ and "npm install" to continue from "node install.js" point.

@apokaliptis
Copy link

apokaliptis commented Feb 13, 2017

Even after following @JudyHsiao and @sencis82's suggestions, the install process still hangs on install.js to then fail. I'm on Windows 10.

PS C:\Program Files\nodejs\node_modules\electron> npm install
npm WARN deprecated standard-format@1.6.10: standard-format is deprecated in favor of a built-in autofixer in 'standard'
. Usage: standard --fix
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> spawn-sync@1.0.15 postinstall C:\Program > Files\nodejs\node_modules\electron\node_modules\spawn-sync
> node postinstall

> electron@1.4.15 postinstall C:\Program Files\nodejs\node_modules\electron
> node install.js

C:\Program Files\nodejs\node_modules\electron\install.js:46
throw err
^

Error: read ECONNRESET
at exports._errnoException (util.js:1023:11)
at TLSWrap.onread (net.js:572:26)

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" "ins
tall"
npm ERR! node v7.5.0
npm ERR! npm v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.4.15 postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.4.15 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 ERR! Please include the following file with any support request:
npm ERR! C:\Users\CK\AppData\Roaming\npm-cache_logs\2017-02-13T01_40_23_562Z-debug.log
PS C:\Program Files\nodejs\node_modules\electron>`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants