vuejs / devtools-v6

⚙️ Browser devtools extension for debugging Vue.js applications.
https://devtools-v6.vuejs.org/
MIT License
24.66k stars 4.15k forks source link

[standalone electron app] Can't install on linux #679

Open probil opened 6 years ago

probil commented 6 years ago

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
probil commented 6 years ago

Can be verified on any platform using docker

gterras commented 6 years ago

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

probil commented 6 years ago

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

probil commented 6 years ago

@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
fabioguarrasi commented 6 years ago

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

probil commented 6 years ago

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

fabioguarrasi commented 6 years ago

@probil are you using sudo ?

probil commented 6 years ago

@fabioguarrasi Yeap

fabioguarrasi commented 6 years ago

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

probil commented 6 years ago

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.

fabioguarrasi commented 6 years ago

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

hubitor commented 6 years ago

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

aivarsliepa commented 6 years ago

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

HeinWinToe commented 6 years ago

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.

mtarun15 commented 5 years ago

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

aivarsliepa commented 5 years ago

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

rnmhdn commented 5 years ago

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

> electron@1.7.16 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! electron@1.7.16 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@1.7.16 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
rnmhdn commented 5 years ago

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.

bnsv commented 5 years ago

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 electron@1.7.16 postinstall: `node install.js`
8105 error Exit status 1
8106 error Failed at the electron@1.7.16 postinstall script.
8106 error This is probably not a problem with npm. There is likely additional logging output above.
8107 verbose exit [ 1, true ]
AmitGurbani commented 3 years ago

It's 05 February 2021, I am facing same issue on Ubuntu 20. Any updates?