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

Can't install electron 1.7.6 in Ubuntu 16.04 environment #10604

Closed
tom--bo opened this issue Sep 25, 2017 · 10 comments
Closed

Can't install electron 1.7.6 in Ubuntu 16.04 environment #10604

tom--bo opened this issue Sep 25, 2017 · 10 comments

Comments

@tom--bo
Copy link

tom--bo commented Sep 25, 2017

Expected behavior

install successfully

Actual behavior

arise error below

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

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

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

Error: read ECONNRESET
    at _errnoException (util.js:1026:11)
    at TLSWrap.onread (net.js:606:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.7.6 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@1.7.6 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

How to reproduce

I'm not sure but, someone using linux can't install electron 1.7.6 by npm?

@welcome
Copy link

welcome bot commented Sep 25, 2017

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@enlight
Copy link
Contributor

enlight commented Sep 25, 2017

The issue is with your internet connection, try again later or use a different connection.

@enlight enlight closed this as completed Sep 25, 2017
@tberghuis
Copy link

try sudo npm install -g electron --unsafe-perm=true --allow-root

@paperbenni
Copy link

@tberghuis works but sounds dirty.

@MarshallOfSound
Copy link
Member

but sounds dirty.

That's because it is, you should never use sudo with npm let alone --unsafe-perm. instead of forcing the install with sudo you should fix the underlying issue which is the permissions of your global node_modules folder being bad 👍

@NithinRRamesh
Copy link

Thank you it works

@NithinRRamesh
Copy link

https://electronjs.org/docs/tutorial/installation actually the same solution is suggested by electron documentation

@zihadmahiuddin
Copy link

Wow it works!
Thanks.

@gasparyanyur
Copy link

@tberghuis after running a command which you said I am getting error

Error: connect ECONNREFUSED 52.216.0.104:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1173:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.8.4 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@1.8.4 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!     /home/yuri/.npm/_logs/2018-04-26T07_12_43_995Z-debug.log

@dcaldwell-sw
Copy link

If you used 'sudo npm install -g electron' you need to fix folder permissions for /usr/lib/node_modules:

sudo chmod 0774 /usr/lib/node_modules/ -R
sudo chown root:sudo node_modules/ -R
if you aren't a member of the sudo group, change sudo to a group you are a member of.

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

9 participants