devtools: [standalone electron app] Can't install on linux

Version

4.1.4

Browser and OS info

Archlinux (latest) / Ubuntu (latest)

Steps to reproduce

Run in terminal:

sudo npm install -g @vue/devtools

What is expected?

@vue/devtools successfully installed

What is actually happening?

@vue/devtools is not installed


Operation log:

# npm install -g @vue/devtools
/usr/local/bin/vue-devtools -> /usr/local/lib/node_modules/@vue/devtools/bin.js

> electron@1.7.11 postinstall /usr/local/lib/node_modules/@vue/devtools/node_modules/electron
> node install.js

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

Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue/devtools/node_modules/electron/.electron'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.7.11 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@1.7.11 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!     /root/.npm/_logs/2018-05-02T15_08_07_733Z-debug.log

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 6
  • Comments: 20

Most upvoted comments

Same issue on Manjaro. Based upon #609 and Troubleshooting Guide from electron, I can install it by setting --unsafe-perm to true. Complete command would be sudo npm install -g @vue/devtools --unsafe-perm=true.

I get the same error on Arch Linux (also with sudo)

run this command sudo chown -R `whoami` /Users/{{your_user_profile}}/.npm-global/ then install the package globally without using sudo

even i am facing this issue for so long please help

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

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

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

Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/electron/.electron’ npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! electron@4.1.4 postinstall: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron@4.1.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/tarunmanchukonda/.npm/_logs/2019-04-09T08_51_19_163Z-debug.log