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

Created on 2 May 2018  路  20Comments  路  Source: vuejs/vue-devtools

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

> [email protected] 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! [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.

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
bug electron app need team repro

Most helpful comment

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.

All 20 comments

Can be verified on any platform using docker

Your error message says permission denied, npm global installs must be given root privileges.

@gterras Command was run with root privileges. I'm sure about that.
I've update the description so it's more obviously now

@gterras FYI https://askubuntu.com/a/700266/510172

If you are using bash (the default), your prompt will tell you if you are acting as root. If it ends in a $ you are running as a normal user. If it ends in a # you are running as root.

Check the line above (it ends with a # so, I'm running it as root )

# npm install -g @vue/devtools

Any updates on this issue? I'm getting the same error when trying to install devtools. Thanks

Thanks for your message @fabioguarrasi. I thought I'm alone with this issue. Please, :+1: the issue to support it :)

@probil are you using sudo ?

@fabioguarrasi Yeap

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

It seems like you are from Mac OS world. There is no /Users/ folder on linux :smile:
I have no issue with any other packages installed with root permission globally.

yes, I have a mac. I never had issues with root permission as well, but this helped me to solve the problem

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

Can confirm, have the same issue on Ubuntu 18.04.
Tried both with sudo and as root.

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.

same issue with Ubutnu please help !

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

[email protected] 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! [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.

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

@tarunmanchukonda
I ended up using Chrome extension instead of standalone electron app.

I also have this issue, Here is what I was doing until now: #1076
Reading this thread I tried with sudo and here is what I get: btw I'm on Archlinux:

$ sudo npm install -g @vue/devtools
/usr/bin/vue-devtools -> /usr/lib/node_modules/@vue/devtools/bin.js

> [email protected] postinstall /usr/lib/node_modules/@vue/devtools/node_modules/electron
> node install.js

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

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@vue/devtools/node_modules/electron/.electron'
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.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-10-15T14_31_45_905Z-debug.log

This issue has been open for 1 year and 5 months and almost 10 people are having it. Please consider putting some effort on this. Please keep in mind that some of us are using vue for native applications, I'm using nativescript-vue personally. For us, using browser extension is not an option. We have to use the electron app. I'm sure you know how difficult vuejs development can be without the wonderful devtools.

I also experienced it. I tried to install it in a newest Lubuntu 19.10 but I get the same error with @aranmohyeddin @tarunmanchukonda and @probil. Its said that its a permission isuue even though I already sudoing. Here is the additional log from /root/.npm/_logs/2019-10-24T17_42_40_610Z-debug.log

8103 error code ELIFECYCLE
8104 error errno 1
8105 error [email protected] postinstall: `node install.js`
8105 error Exit status 1
8106 error Failed at the [email protected] postinstall script.
8106 error This is probably not a problem with npm. There is likely additional logging output above.
8107 verbose exit [ 1, true ]
Was this page helpful?
0 / 5 - 0 ratings

Related issues

davestewart picture davestewart  路  3Comments

sithuaung picture sithuaung  路  4Comments

sparlos picture sparlos  路  3Comments

gustojs picture gustojs  路  3Comments

Gedminas picture Gedminas  路  3Comments