npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! ubuntu code example

Example 1: The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user

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

Example 2: The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user

cd /Users/Marc/Desktop/Dev
rm -rf ./masterclass/node_mdoules/
chown -R $USER ./masterclass/
cd masterclass    
npm install

Tags:

Misc Example