ReLaXed icon indicating copy to clipboard operation
ReLaXed copied to clipboard

Error: EACCES: permission denied, access \'/usr/lib/node_modules/relaxedjs\

Open rationalthinker1 opened this issue 7 years ago • 6 comments

Hello, I ran npm i -g relaxedjs with and without sudo and I keep getting the error listed in the subject line. I was able to run sudo npm i -g relaxedjs --unsafe-perm=true with no problem but I get an error "UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!" How do I get it to work?

rationalthinker1 avatar May 23 '18 08:05 rationalthinker1

What OS are you on ? And does it work if you do the local installation described in the troubleshooting section of the wiki ?

https://github.com/RelaxedJS/ReLaXed/wiki/Troubleshooting#the-installation-fails

Zulko avatar May 23 '18 08:05 Zulko

Okay, I got it to work if I removed the global parameter for the installation. I am working in Ubuntu 18.04. However, I get another problem running puppeteer.

This occurs after I run:

npm i relaxedjs
touch my_document.pug
relaxed my_document.pug

(node:9639) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome! [0523/044903.699656:ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received. [0523/044903.699790:FATAL:content_main_delegate.cc(57)] Check failed: false.

rationalthinker1 avatar May 23 '18 15:05 rationalthinker1

If you only did a local install like this, then the "relaxed" command certainly still refers to the old one you got when you were installing relaxed globally.

Have you tried installing locally with the procedure explained in the wiki (cf link in the previous post) ? In particular npm link is important, it is what will give you the relaxed command linking to your local relaxed installation.

Zulko avatar May 23 '18 16:05 Zulko

I have had similar issues, this is not relaxed related at all. Its that on your linux OS node installs globally in a directory that requires root access. npm should not ever need root access for anything, you should switch your node global directory to a non root location. Since you are on a linux system, edit your ~/.npmrc file:

It should contain something like prefix=/lib/node_modules change this to something you do not need user access to. I set mine to prefix=~/.npm-global. You will need to reinstall all your global npm packages though.

Drew-S avatar May 25 '18 23:05 Drew-S

That's often a problem with npm. Do you use npm 6?

DanielRuf avatar May 26 '18 05:05 DanielRuf

Yea, I am on npm 6.0.1.

Drew-S avatar May 26 '18 05:05 Drew-S