I’ve been working in development for some time, and I think is my time to face Linux and overcome my fear to it.
I’ve been struggling to install Node; I’ve tried with Snap, wit Asdf, and now I did it with Pacman (
sudo pacman -Syu nodejs npm); yes, I’ve tried all that because I was getting errors and tought that probably a clean install from other places could solve it, buuuut, it didn’t.
I’m currently trying to install Gatsby; whenever I run the command
npm install -g gatsby-cli, I get the following error:
3165 error Error: EACCES: permission denied, access '/usr/lib/node_modules' 3165 error errno: -13, 3165 error code: 'EACCES', 3165 error syscall: 'access', 3165 error path: '/usr/lib/node_modules' 3165 error }
I’ve tried to solve it running the following:
sudo chown -R $USER /usr/local/lib/node_modules sudo chown -R $(whoami) ~/.npm
But, it didn’t work (even if the owner of the folder was correctly changed).
Can anyone help me a little bit with this, please?