Skip to content

npm install fails with permission errors #4

Discussion options

You must be logged in to vote

The error you encountered indicates that you don't have the necessary permissions to install packages globally using npm.

check this:

sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) /usr/local/lib/node_modules

npm config set prefix ~/.npm

Remember that using sudo grants administrator permissions, which can have security implications. It's important to be aware of what you're doing and how it might affect your system.

I hope this helps you resolve the issue! If you need further assistance, feel free to ask.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Beatrice-jack
Comment options

Answer selected by Beatrice-jack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants