Error: EACCES: permission denied, access \'/usr/lib/node_modules/relaxedjs\
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?
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
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.
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.
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.
That's often a problem with npm. Do you use npm 6?
Yea, I am on npm 6.0.1.