orellabac
orellabac

Reputation: 2655

npm WARN checkPermissions Missing write access

I have been trying to fix the issue of running node without using sudo on my mac but I keep getting this message:

npm WARN checkPermissions Missing write access to /Users/myuser/.npm-packages/lib/node_modules/npm And still find no fix for that. Has anyone seen this issue before?

Upvotes: 5

Views: 18377

Answers (3)

Vladimir Eremenko
Vladimir Eremenko

Reputation: 1

Works for me on Ubuntu:

sudo chown -R $USER /usr/local

Upvotes: 0

Giuseppe Garassino
Giuseppe Garassino

Reputation: 2292

This is a known bug, even now with npm 6.14 available. Here it is a link to npm.community.

You can give current user permission to access node_modules using this in terminal:

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

and then npm install.

Upvotes: 10

orellabac
orellabac

Reputation: 2655

OK I found what was wrong. I tried to open the /Users/myuser/.npm-packages/lib/node_modules/npm folder on finder to see if I could change the folder permissions but it seemed like the npm folder was pointing to some non-existing directory. So I removed the npm symbolic link and created a new empty npm folder and everything seems to be working now.

Upvotes: 4

Related Questions