Fix NPM Error: Attempt To Unlock * Which Hasn't Been Locked

Posted by Weston Ganger

I was getting the weird error Attempt to unlock some_module, which hasn’t been locked.

That’s weird, turns out its a permissions thing.


sudo chown -R $USER ~/.npm
sudo chown -R $USER /usr/local/lib/node_modules

# if your on a OSX and still having problems
sudo chown -R $USER /usr/local


Related External Links:

Article Topic:Software Development - Node.js

Date:January 21, 2016

Recommended Posts

Contact

604-309-8713
info@solidfoundationwebdev.com

Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected