How to fix Node.js npm permission problems

This is a small tip i want to share with you.

Sometimes when you are playing around with Node dependencies you can come into an issue like this Error: EPERM: operation not permitted, chmod ' when running `gulp``

That error can occur if you have been running sudo npm install`` on a Virtual machine like Vagrant, and now you are trying to rungulp`` it fails with the error message just described.

It turns out that you don’t have to run `sudo npm install``` again as Administrator, and doing so won’t fix the problem. Trynpm cache cleanand delete your compiledCSS/JS` first.

Hope it helps, this has always fixed things for me.