Coder Social home page Coder Social logo

Comments (67)

mafintosh avatar mafintosh commented on August 11, 2024 12

@NathanJang try deleting ~/.electron and try again - i'm curious if that works

from electron-prebuilt.

NathanJang avatar NathanJang commented on August 11, 2024 2

@mafintosh

~/G/P/SRT-signup (master) $ npm install --save-dev electron-prebuilt 
|
> [email protected] install /Users/jonchan/Gits/Private/SRT-signup/node_modules/electron-prebuilt
> node install.js

Downloading electron-v0.26.0-darwin-x64.zip
[=================================================>] 100.0% (550.36 kB/s)
[email protected] node_modules/electron-prebuilt
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])

It worked this time, thanks! 😄

from electron-prebuilt.

operando avatar operando commented on August 11, 2024 2

I was able to install in the following command.

mkdir .electron
chmod 777 .electron/
sudo npm -g install electron-prebuilt

from electron-prebuilt.

jakefb avatar jakefb commented on August 11, 2024 2

I have tried reinstalling nodejs and npm and changing the permissions of ~/.electron with chmod 777. When I run sudo npm install electron-prebuilt -g I still get:

/usr/lib/node_modules/electron-prebuilt/install.js:15
throw err
^
Error: EACCES, mkdir '/root/.electron'

I'm running Debian 8

from electron-prebuilt.

RnbWd avatar RnbWd commented on August 11, 2024 1

There have been a few changes in how this library downloads files recently, and it exists in a separate repo now: https://github.com/maxogden/electron-download

Maybe, try deleting the node_modules folder (for electron-prebuilt), and using npm-install again. There might have been small hiccups with the electron download path? I haven't followed closely but there have been a few PR's in the electron-download in the last 12 hours could have led to a temporary disruption nvm those PR's shouldn't have affected the download path but if you copied over the command line error it'd be easier to debug than the entire npm-debug because the windows / linux issues might not be related?

from electron-prebuilt.

greco avatar greco commented on August 11, 2024 1

i'm deleted "electron-v0.25.3-win32-x64.zip" in my home folder(@C:\Users\Greco.electron)

and then run command "npm i electron-prebuilt --save-dev" , it's ok,worked!

so, may be the zip file is not complete

from electron-prebuilt.

askhogan avatar askhogan commented on August 11, 2024 1

Got it to work by doing chmod 777 ~/.electron on mac OSX

from electron-prebuilt.

pirafrank avatar pirafrank commented on August 11, 2024 1

Hi guys, this issue still happens. It has just occurred on OS X 10.10.4 trying to install electron-prebuilt 0.30.3 globally with sudo. Below the full output.

francesco@Golden-Hind:~$ sudo npm i -g [email protected]
/usr/local/bin/electron -> /usr/local/lib/node_modules/electron-prebuilt/cli.js

> [email protected] postinstall /usr/local/lib/node_modules/electron-prebuilt
> node install.js

Downloading electron-v0.30.3-darwin-x64.zip
[============================================>] 100.0% of 37.13 MB (1.75 MB/s)
/usr/local/lib/node_modules/electron-prebuilt/install.js:15
  throw err
        ^
Error: EACCES, rename '/usr/local/lib/node_modules/electron-prebuilt/electron-tmp-download/electron-v0.30.3-darwin-x64.zip'
    at Error (native)
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "i" "-g" "[email protected]"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /Users/francesco/npm-debug.log

I confirm that chmod 777 ~/.electron fixes this. It doesn't happen on Linux (at least elementary 0.2).

from electron-prebuilt.

pgaskin avatar pgaskin commented on August 11, 2024 1

These commands work for me:

sudo apt-get install -y nodejs-legacy nodejs npm
rm -rf ~/.electron
mkdir ~/.electron
chmod 777 ~/.electron/
sudo npm -g install electron-prebuilt

Explanation:

  • sudo apt-get install nodejs-legacy enables use of the node command instead of just nodejs. The installer uses the node command
  • rm -rf ~/.electron removes the folder as mentioned above
  • mkdir ~/.electron creates the folder so it can be chmodded
  • chmod 777 ~/.electron sets the permissions to avoid the EACCES error
  • sudo npm -g install electron-prebuilt installs electron-prebuilt

from electron-prebuilt.

greco avatar greco commented on August 11, 2024

me too, but on windows 7

io.js
$npm -v
2.9.0

from electron-prebuilt.

greco avatar greco commented on August 11, 2024

my npm debug log
zip(132kb)
http://pan.baidu.com/s/1jG7XqEM

from electron-prebuilt.

RnbWd avatar RnbWd commented on August 11, 2024

@greco looks like a path issue in windows. - https://stackoverflow.com/questions/28425229/why-cant-execute-npm-start-or-even-other-npm-commands

Most of the dev's working on this project use macs (I think), so I can't say if it's a path issue that's solvable in windows, or if our attempt to download zips into user-home (source code) was a mistake for windows users, it should work on windows but it could be funky if path env's are weird

from electron-prebuilt.

greco avatar greco commented on August 11, 2024

Thanks @RnbWd , I'll try it

from electron-prebuilt.

bobpappas avatar bobpappas commented on August 11, 2024

Same problem on Mac:

7209 error Darwin 14.0.0
7210 error argv "node" "/usr/local/bin/npm" "install" "electron-prebuilt" "-g" "--verbose"
7211 error node v0.12.2
7212 error npm v2.7.4
7213 error code ELIFECYCLE
7214 error [email protected] install: node install.js
7214 error Exit status 1
7215 error Failed at the [email protected] install script 'node install.js'.
7215 error This is most likely a problem with the electron-prebuilt package,
7215 error not with npm itself.
7215 error Tell the author that this fails on your system:
7215 error node install.js
7215 error You can get their info via:
7215 error npm owner ls electron-prebuilt
7215 error There is likely additional logging output above.

from electron-prebuilt.

mafintosh avatar mafintosh commented on August 11, 2024

@bobpappas could you copy the entire command line output?

from electron-prebuilt.

NathanJang avatar NathanJang commented on August 11, 2024

I've tried installing the new 0.26.0 now, with the same issue. Doing it globally (npm i -g) has similar results. The binary downloads completely, but installation fails after downloading finishes. npm-debug.log

from electron-prebuilt.

mafintosh avatar mafintosh commented on August 11, 2024

@NathanJang i need the cli output. npm-debug.log unfortunately doesn't help us as this is probably a problem with downloading the binary in the install script

from electron-prebuilt.

NathanJang avatar NathanJang commented on August 11, 2024
~/G/P/SRT-signup (master) $ npm install --save-dev electron-prebuilt 
-
> [email protected] install /Users/jonchan/Gits/Private/SRT-signup/node_modules/electron-prebuilt
> node install.js

Downloading electron-v0.26.0-darwin-x64.zip
[=================================================>] 100.0% (1.79 MB/s)
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: invalid central directory file header signature: 0xe03a4436
    at /Users/jonchan/Gits/Private/SRT-signup/node_modules/electron-prebuilt/node_modules/extract-zip/node_modules/yauzl/index.js:157:70
    at /Users/jonchan/Gits/Private/SRT-signup/node_modules/electron-prebuilt/node_modules/extract-zip/node_modules/yauzl/index.js:342:5
    at /Users/jonchan/Gits/Private/SRT-signup/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! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--save-dev" "electron-prebuilt"
npm ERR! node v0.12.2
npm ERR! npm  v2.9.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install 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!     /Users/jonchan/Gits/Private/SRT-signup/npm-debug.log

@mafintosh here you go

from electron-prebuilt.

mafintosh avatar mafintosh commented on August 11, 2024

@NathanJang thanks! does it work if you try again?

from electron-prebuilt.

NathanJang avatar NathanJang commented on August 11, 2024

@mafintosh nope, exactly the same error unfortunately. Thanks for your help!

from electron-prebuilt.

mafintosh avatar mafintosh commented on August 11, 2024

@NathanJang was this after your removed ~/.electron?

from electron-prebuilt.

NathanJang avatar NathanJang commented on August 11, 2024

@mafintosh yes

from electron-prebuilt.

max-mapper avatar max-mapper commented on August 11, 2024

@mafintosh @sindresorhus check out electron/electron#1709 (comment), is it possible a user wouldn't have permission to create a folder in their own home directory? Maybe node install.js is getting spawned with the wrong permissions or something?

from electron-prebuilt.

mafintosh avatar mafintosh commented on August 11, 2024

@maxogden i think he would need to run it with --unsafe-perm for it to work since he's root and npm runs stuff as nobody

from electron-prebuilt.

max-mapper avatar max-mapper commented on August 11, 2024

@mafintosh hmm I wonder we can do to make this problem go away

from electron-prebuilt.

mafintosh avatar mafintosh commented on August 11, 2024

@maxogden to fix the EACCESS one, we could detect if you have write access to the cache (by writing a dummy file) and if not just write directly to the module folder as we used to do.

from electron-prebuilt.

RnbWd avatar RnbWd commented on August 11, 2024

Two potential issues causes this:

  1. Anyone who downloaded a version of electron-prebuilt prior to tempdir was implemented, and tried downloading but didn't finish the download, will be affected by this (low number hopefully).

  2. But, this happened in 0.26 after it should have been fixed. There's (maybe) an issue with npm's cache resolution not caring about electron-download versions ^1.0.x. I recommended depreciated and upgrading versions here - #4.

Either way I think it should only impact an extremely low # of developers.

from electron-prebuilt.

RnbWd avatar RnbWd commented on August 11, 2024

Also prior to electron-download I was deleting the the electron cache on all errors - (obviously not ideal), but it would fix this situation. Ideally deleting the cache for more specific errors is the right way to implement, but I'm not as competent as y'all regarding this.

from electron-prebuilt.

RnbWd avatar RnbWd commented on August 11, 2024

Uninstalling and re-installing nodejs and npm from my system fixed the issue for me. Thanks

In response to @mafintosh

check out atom/electron#1709 (comment)

root/.electron could be an issue? But no reason to believe that deleting .electron could have worked the same as reinstalling node/npm.

from electron-prebuilt.

datoulei avatar datoulei commented on August 11, 2024

Error: EACCES, rename '/usr/local/lib/node_modules/electron-prebuilt/electron-tmp-download/electron-v0.26.0-darwin-x64.zip'
at Error (native)

from electron-prebuilt.

 avatar commented on August 11, 2024

I had this error. It was resolved after I updated NPM from 2.7 to 2.10.

sudo npm install npm -g

Before I updated I noticed that I was able to use

npm install electron-prebuilt --save-dev

but wasn't able to install it globally using -g.
I saw the comment that removing .electron might fix it so I wanted to try that.
But there was no .electron map for me. I had to manually create .electron.
After that I was able to download the binary but not install it.

I got the EACCESS error everybody else seemed to be having.
Like I mentioned earlier I fixed that by running

sudo npm install npm -g

from electron-prebuilt.

flaviocopes avatar flaviocopes commented on August 11, 2024

The main problem I think is the script cannot create .electron/. I created it manually and the global install worked 👍

from electron-prebuilt.

capouch avatar capouch commented on August 11, 2024

Upgrading npm and performing the above (operando) hack worked just fine for me, too.

from electron-prebuilt.

nomosyn avatar nomosyn commented on August 11, 2024

Me too!

from electron-prebuilt.

capouch avatar capouch commented on August 11, 2024

Double-check your permissions on /root/.electron.

from electron-prebuilt.

jakefb avatar jakefb commented on August 11, 2024

I didn't have /root/.electron so I created it. The permissions for /root/.electron are drwxr-xr-x. What should they be?

from electron-prebuilt.

capouch avatar capouch commented on August 11, 2024

drwxrwxrwx 2 root root 4096 May 24 16:06 .electron

This isn't the correct best solution, but it will get you going. See operando's post above.

from electron-prebuilt.

stobenski avatar stobenski commented on August 11, 2024
→ node --version
v0.12.4

→ npm --version
2.10.1

→ ls -la /root/ | grep .electron
drwxrwxrwx   2 root root    4096 May 26 12:10 .electron

→ sudo npm install -g electron-prebuilt
/usr/bin/electron -> /usr/lib64/node_modules/electron-prebuilt/cli.js

> [email protected] postinstall /usr/lib64/node_modules/electron-prebuilt
> node install.js

/usr/lib64/node_modules/electron-prebuilt/install.js:15
  throw err
        ^
Error: EACCES, mkdir '/root/.electron'
    at Error (native)
npm ERR! Linux 4.0.4-gentoo
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "electron-prebuilt"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE

😢 😭 😿

from electron-prebuilt.

jclohmann avatar jclohmann commented on August 11, 2024

I'm getting the same error, barwinco gets.

In a docker-container (as root):

-> iojs --version
v2.1.0

-> ls -la /root
total 20
drwx------ 3 root root 4096 May 26 09:55 .
drwxr-xr-x 56 root root 4096 May 26 09:55 ..
-rw-r--r-- 1 root root 3106 Feb 20 2014 .bashrc
drwxrwxrwx 2 root root 4096 May 26 09:55 .electron
-rw-r--r-- 1 root root 140 Feb 20 2014 .profile

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

[email protected] postinstall /usr/lib/node_modules/electron-prebuilt
node install.js

/usr/lib/node_modules/electron-prebuilt/install.js:15
throw err
^
Error: EACCES: permission denied, mkdir '/root/.electron'
at Error (native)
npm ERR! Linux 3.16.0-0.bpo.4-amd64
npm ERR! argv "/usr/bin/iojs" "/usr/bin/npm" "install" "electron-prebuilt" "-g"
npm ERR! node v2.1.0
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /npm-debug.log

from electron-prebuilt.

jakefb avatar jakefb commented on August 11, 2024

Same here, making the permissions of /root/.electron drwxrwxrwx didn't fix the problem for me either. Hopefully this gets fixed soon!

from electron-prebuilt.

max-mapper avatar max-mapper commented on August 11, 2024

So far we haven't been able to reproduce the problem. If anyone has steps to reproduce then we can fix it. I tested this on a fresh debian jessie image w/ iojs 2.1.0 yesterday and it worked fine for me, and it has also worked on 3 ubuntu boxes.

@jclohmann could you share your dockerfile?

from electron-prebuilt.

max-mapper avatar max-mapper commented on August 11, 2024

Also if anyone on a system that can reproduce the failure wants to poke around, here is the line that is causing the problem: https://github.com/maxogden/electron-download/blob/a894734d2820d489836ecaa6f6a0c17712ad9516/index.js#L26. As you can see it's a simple mkdir call. I'm not sure why this is failing on a small percentage of linux machines, but maybe someone can figure it out.

You can do this to reproduce from source:

git clone https://github.com/mafintosh/electron-prebuilt.git
cd electron-prebuilt
npm link

And it should fail

Then you can edit node_modules/electron-download/index.js to modify the download script to try and make it work

from electron-prebuilt.

jclohmann avatar jclohmann commented on August 11, 2024

I've extracted this from my Dockerfiles:

FROM ubuntu:14.10

# set company-proxy
# ENV http_proxy http://XXXXXXX/
# ENV https_proxy http://XXXXXXX/
# ENV no_proxy localhost, 127.0.0.1, company.de, .company.de

# RUN echo "Acquire::http::Proxy \"$http_proxy\";" >> /etc/apt/apt.conf && \
#     echo "Acquire::https::Proxy \"$https_proxy\";" >> /etc/apt/apt.conf

# install iojs
RUN apt-get install -y wget

RUN wget "https://deb.nodesource.com/setup_iojs_2.x" && chmod +x setup_iojs_2.x && ./setup_iojs_2.x
RUN apt-get update && apt-get install iojs -fy

# apply operando's hack
RUN mkdir /root/.electron && \
    chmod 777 /root/.electron && \
    ls -la /root

# try to install electron
RUN npm install electron-prebuilt -g

from electron-prebuilt.

max-mapper avatar max-mapper commented on August 11, 2024

@jclohmann awesome, reproduced! will look into a fix...

from electron-prebuilt.

max-mapper avatar max-mapper commented on August 11, 2024

ah looks like process.env.HOME is /. weird

root@af3586b6b1c7:/# node
> process.env
{ HOSTNAME: 'af3586b6b1c7',
  TERM: 'xterm',
  PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
  PWD: '/',
  SHLVL: '1',
  HOME: '/',
  _: '/usr/bin/node' }

from electron-prebuilt.

max-mapper avatar max-mapper commented on August 11, 2024

whats weird is that I have 14.04 installed on my server and I get this:

root@burrito:/media/cluster/containers/electron-bug# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty
root@burrito:/media/cluster/containers/electron-bug# whoami
root
root@burrito:/media/cluster/containers/electron-bug# node -pe "process.env.HOME"
/root

@mafintosh what do you think of this:

if the mkdir fails, we catch the error and try to mkdir ./.electron instead. if that fails then we throw

from electron-prebuilt.

max-mapper avatar max-mapper commented on August 11, 2024

@jclohmann ok published a new version of electron-download and tested your dockerfile and it works now. thanks for helping debug

from electron-prebuilt.

jclohmann avatar jclohmann commented on August 11, 2024

@maxogden It's working for me, now. Thanks for the fix.

from electron-prebuilt.

joshbalfour avatar joshbalfour commented on August 11, 2024

Had this issue on [email protected] on OS X 10.10.4, deleted everything in ~/.electron and chmod 777 the directory and that fixed it.

from electron-prebuilt.

RnbWd avatar RnbWd commented on August 11, 2024

I'm wonder why read/write permissions wouldn't work in the home directly? maybe dependent on user permissions and npm / node versions?

mkdirp is a fairly straight forward:

If opts.mode isn't specified, it defaults to 0777 & (~process.umask()).

case 'ENOENT':
                mkdirP(path.dirname(p), opts, function (er, made) {
                    if (er) cb(er, made);
                    else mkdirP(p, opts, cb, made);
                });
                break;
 default:
                xfs.stat(p, function (er2, stat) {
                    // if the stat fails, then that's super weird.
                    // let the original error be the failure reason.
                    if (er2 || !stat.isDirectory()) cb(er, made)
                    else cb(null, made);
                });
                break;

... ????relevant code????....

       case 'ENOENT' :
                made = sync(path.dirname(p), opts, made);
                sync(p, opts, made);
                break;

            // In the case of any other error, just see if there's a dir
            // there already.  If so, then hooray!  If not, then something
            // is borked.
            default:
                var stat;
                try {
                    stat = xfs.statSync(p);
                }
                catch (err1) {
                    throw err0;
                }
                if (!stat.isDirectory()) throw err0;
                break;
        }

Is chmod 777 equivalent to 0777 & (~process.umask())? Anything look weird in error handling? I can't tell... it's probably not effecting that many people

from electron-prebuilt.

max-mapper avatar max-mapper commented on August 11, 2024

@pirafrank can you try this?

mkdir test
cd test
npm init # use default values
npm i electron-prebuilt
cd node_modules/electron-prebuilt
npm link

my guess is your npm permissions are messed up in some way, but its hard to diagnose

from electron-prebuilt.

pirafrank avatar pirafrank commented on August 11, 2024

I tried, you're right. I've then sanitised my node install basically uninstalling and reinstalling in ~ using nvm. sudo's not needed anymore. Thank you!

For those reading this lately
Check nvm install instruction in the readme of the repo. After a few commands you'll have a clean working installation of node. Backup your modules and remove any previous node trace first.

from electron-prebuilt.

fritx avatar fritx commented on August 11, 2024
root:~/dev/wxbot# npm i -g electron-prebuilt
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.32","npm":"1.4.28"})
/root/local/bin/electron -> /root/local/lib/node_modules/electron-prebuilt/cli.js

> [email protected] postinstall /root/local/lib/node_modules/electron-prebuilt
> node install.js

sh: 1: node: Permission denied

npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
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! System Linux 3.13.0-32-generic
npm ERR! command "/root/local/bin/node" "/root/local/bin/npm" "i" "-g" "electron-prebuilt"
npm ERR! cwd /root/dev/wxbot
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

from electron-prebuilt.

fritx avatar fritx commented on August 11, 2024

#27 (comment) @maxogden 's answer works, thanks!

from electron-prebuilt.

gabrielaimeeg avatar gabrielaimeeg commented on August 11, 2024

#27 (comment) @greco 's answer worked for me, thank you!

from electron-prebuilt.

FWennerdahl avatar FWennerdahl commented on August 11, 2024

Still having this problem, running sudo npm install electron-prebuilt -g.

Confirmed that removing the ~/.electron folder prior to install solves this. It's not enough to remove the files, the actual folder must be removed.

from electron-prebuilt.

renanborgez avatar renanborgez commented on August 11, 2024

Changing permissions ~/.electron to 777 works for me.

from electron-prebuilt.

VitorLuizC avatar VitorLuizC commented on August 11, 2024
C:\Users\Vitor Cavalcanti>npm install electron-prebuilt -g
C:\Users\Vitor Cavalcanti\AppData\Roaming\npm\electron -> C:\Users\Vitor Cavalcanti\AppData\Roaming\npm\node_modules\electron-prebuilt\cli.js

> [email protected] postinstall C:\Users\Vitor Cavalcanti\AppData\Roaming\npm\node_modules\electron-prebuilt
> node install.js

Downloading electron-v0.36.9-win32-x64.zip
Error: connect ETIMEDOUT 192.30.252.131:443

C:\Users\Vitor Cavalcanti\AppData\Roaming\npm\node_modules\electron-prebuilt\install.js:22
  throw err
  ^
 Error: connect ETIMEDOUT 192.30.252.131:443
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "electron-prebuilt" "-g"
npm ERR! node v5.6.0
npm ERR! npm  v3.6.0
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 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-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\Vitor Cavalcanti\npm-debug.log

from electron-prebuilt.

ungoldman avatar ungoldman commented on August 11, 2024

@VitorLuizC that looks like a timeout error, please try the solution mentioned in #66.

from electron-prebuilt.

dukegod avatar dukegod commented on August 11, 2024

@mafintosh install the pkg 'sudo npm install electron-prebuilt -g'
it also console error log 'install.js:22'
but deleting ~/.electron and try again, it works;
but when it download 60%, it stopped.

from electron-prebuilt.

lai32290 avatar lai32290 commented on August 11, 2024

I'm using Ubuntu x64, When using electron in my package dependency, returning fallowing error:

npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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 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 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!     /npm-debug.log

from electron-prebuilt.

paran0a avatar paran0a commented on August 11, 2024

Can't install electron-prebuilt.

Using win10.

Error below

  throw err
  ^

Error: read ECONNRESET
    at exports._errnoException (util.js:1008:11)
    at TLSWrap.onread (net.js:563:26)
 [                ..] \ postinstall: info lifecycle [email protected]~postinstall: Failed to exec postinnpm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\MyName\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "electron-prebuilt" "-g"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 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-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\MyName\Documents\Projects\test\npm-debug.log

from electron-prebuilt.

zeke avatar zeke commented on August 11, 2024

Error: read ECONNRESET

@paran0a that looks like it may have been a network blip. Can you try again?

from electron-prebuilt.

jesobreira avatar jesobreira commented on August 11, 2024

Hi, @maxogden

my guess is your npm permissions are messed up in some way, but its hard to diagnose

I found a way you can repeat the issue easily.

  1. Create a new fresh Amazon AWS Ubuntu 14.04.5 LTS machine
  2. Install Node and NPM following the docs at NodeJS official webpage:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y build-essential nodejs
  1. Try to install Electron
npm i electron -g

It will fail.

  1. Install allowing unsafe perms:
sudo npm i -g electron --unsafe-perm=true

It works.

from electron-prebuilt.

capouch avatar capouch commented on August 11, 2024

Your step 4 is the key for all the installs I have seen.

from electron-prebuilt.

jesobreira avatar jesobreira commented on August 11, 2024

I've faced this issue in every single machine I've worked with Electron (Linux - different distros and versions - and OS X), so it's hard for me to believe that someone actually is able to install Electron without --unsafe-perm=true, just following the readme file.

I wonder if it should be defined as the "standard" way to install Electron or if we should check compatibility with npx, for example.

Just a ref: https://docs.npmjs.com/getting-started/fixing-npm-permissions

from electron-prebuilt.

andrewhunter0 avatar andrewhunter0 commented on August 11, 2024

用sudo npm install -g react-devtools安装,一直报错:
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/react-devtools/node_modules/electron/electron-tmp-download-62651-1553758792533'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

但是,我换成sudo yarn global add react-devtools命令就安装成功了。

from electron-prebuilt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.