1

I came accross this error that seems to be a permission issue, took me a while so i just wanted to share a solution I found for this.

If other solutions ?, please share them.

2 Answers 2

7

The current solution I found for this issue is to change the permissions to the current user.

sudo chown -R $USER /usr/local/lib/node_modules

then try running

npm install -g <dependency>

Hope this works for you.

0

First i do

ls -la

Identify which folders not below to my user and run

sudo chown -R $USER <FOLDER>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.