Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron 1.6.6 npm global install fails in postinstall phase #9324

Closed
capouch opened this issue Apr 29, 2017 · 10 comments
Closed

Electron 1.6.6 npm global install fails in postinstall phase #9324

capouch opened this issue Apr 29, 2017 · 10 comments

Comments

@capouch
Copy link

capouch commented Apr 29, 2017

  • Electron version:
    1.6.6
  • Operating system:
    Linux Slackware x64

Expected behavior

Normal install

Actual behavior

npm -g install electron
/usr/local/bin/electron -> /usr/local/lib/node_modules/electron/cli.js

> electron@1.6.6 postinstall /usr/local/lib/node_modules/electron
> node install.js

/usr/local/lib/node_modules/electron/install.js:47
  throw err
  ^

Error: EACCES: permission denied, open '/root/.electron/electron-v1.6.6-linux-x64.zip'
    at Error (native)
npm ERR! Linux 4.1.13
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "-g" "install" "electron"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! electron@1.6.6 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@1.6.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 ERR! Please include the following file with any support request:
npm ERR!     /tmp/electron-packager/linux-x64/npm-debug.log

How to reproduce

As root: npm install -g electron

@capouch
Copy link
Author

capouch commented Apr 29, 2017

Go figure. Won't install as root, but will install as my regular user via sudo.

@capouch capouch closed this as completed Apr 29, 2017
@johannesjo
Copy link

johannesjo commented Apr 29, 2017

I got the same error on ubuntu 16.04 with node v6.9.2. Trying to install older versions of electron doesn't help and I'm almost 100% sure that it is not related to user rights.

@alanjames1987
Copy link

alanjames1987 commented Apr 29, 2017

I also have the same error on Ubuntu 16.04 but I'm running Node v6.9.4 and NPM v3.10.10.

I installed Node via NVM so I don't have the option to use sudo.

@codekraft-studio
Copy link

codekraft-studio commented Apr 30, 2017

Env

node -v
v6.10.2
npm -v
4.4.4

for me It does not work either with sudo, but it works locally

sudo npm install -g electron

> electron@1.6.6 postinstall /usr/lib/node_modules/electron
> node install.js

/usr/lib/node_modules/electron/install.js:47
  throw err
  ^

Error: ENOENT: no such file or directory, lstat '/usr/lib/node_modules/electron/dist/resources' at Error (native)

but this command:

npm install --save-dev electron

works great

Duplicate of: #9323

@johannesjo
Copy link

@codekraft-studio that doesn't work for me. I get an ELIFECYCLE error.

npm ERR! Linux 4.4.0-75-generic
npm ERR! argv "/home/user/.nvm/versions/node/v6.9.2/bin/node" "/home/user/.nvm/versions/node/v6.9.2/bin/npm" "install" "electron" "-S"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! electron@1.6.6 postinstall: `node install.js`
npm ERR! Exit status 1

@codekraft-studio
Copy link

@johannesjo
you mean this?

npm install --save-dev electron
works great

it's kind of strange (for me) that the postinstall function works locally with user privilege but not globally with root privs

@johannesjo
Copy link

@codekraft-studio yes. I meant that one.

@fyhao
Copy link

fyhao commented Apr 30, 2017

Faced this issue now

@stephentth
Copy link

npm -g install electron

Confirm it not working on Windows 10 - 64 bit, latest update.

Node version: v7.7.4
NPM version: 4.1.2

Error: ENOENT: no such file or directory, lstat 'C:\Users\MyUsername\AppData\Roaming\npm\node_modules\electron\dist\resources'
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "electron"
npm ERR! node v7.7.4
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE

npm ERR! electron@1.6.6 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.6.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 ERR! Please include the following file with any support request:
npm ERR!     C:\Users\MyUsername\Tmp\electron-quick-start\npm-debug.log

@codekraft-studio
Copy link

codekraft-studio commented Apr 30, 2017

for anybody who run in this issue, it has been determined the cause here: #9323

I'm going to lock this thread until extract-zip has been fixed, since the cause has been identified.

So until is resolved I guess has no sense to keep posting here the error dumps or +1

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

No branches or pull requests

5 participants