npm WARN checkPermissions Missing write access

Viewed 17090

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?

3 Answers

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.

Works for me on Ubuntu:

sudo chown -R $USER /usr/local

Related