Error Installing Electron Npm

Asked 1 years ago, Updated 1 years ago, 119 views

An error occurs when npm install-gelectron-prebuild is performed to install the electron.
What should I do?

sudonpm install-gelectron-prebuild results in an error similar to the following:
What's going on with the permission denied running sudo?

io.js uses 3.2.0 and electron wants to use the latest one.

error.txt


/usr/local/lib/node_modules/electron-prebuild/install.js:15
  below err
  ^

Error: EACCES:permission denied, rename '/usr/local/lib/node_modules/electron-prebuild/electron-tmp-download-10190-1440591106010/electron-v0.30.6-darwin-x64.zip'->'/Users/user_username.x64.electron-electrrrrrrrr0
    at Error (native)
npm ERR! Darwin 14.5.0
npm ERR!argv"/usr/local/bin/iojs""/usr/local/bin/npm""install"" -g""electron-prebuild"
npm ERR!node v3.2.0
npm ERR!npm v2.14.0
npm ERR!code ELIFECYCLE

npm ERR!electron-prebuild @0.30.6 postinstall: `node install.js`
npm ERR! Exit status 1
US>npm ERR! 
npm ERR!Failed at the electron-prebuild @0.30.6 postinstall script 'node install.js'.
npm ERR! This is most like a problem with the electron-prebuild package,
npm ERR! not with npmitself.
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-prebuild
npm ERR! There is like additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!/Users/user_name/npm-debug.log


npm electron

2022-09-30 20:13

1 Answers

Now that I've solved myself, I'll post it.

npm [email protected] #The latest version of this answer when you wrote it
So I tried to install the latest version with the version, and it worked.


2022-09-30 20:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.