NPM error while after setting up MongoDB


after setting up the MongoDB,

:~/workspace/myapp (master) $ npm install
npm WARN prefer global jshint@2.8.0 should be installed with -g
npm ERR! Linux 4.2.0-c9
npm ERR! argv “/home/ubuntu/.nvm/versions/node/v4.2.4/bin/node” “/home/ubuntu/.nvm/versions/node/v4.2.4/bin/npm” "install"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! path /home/ubuntu/workspace/myapp/node_modules/.bin/jshint
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink

npm ERR! Error: EACCES: permission denied, unlink '/home/ubuntu/workspace/myapp/node_modules/.bin/jshint’
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, unlink ‘/home/ubuntu/workspace/myapp/node_modules/.bin/jshint’]
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘unlink’,
npm ERR! path: ‘/home/ubuntu/workspace/myapp/node_modules/.bin/jshint’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/workspace/myapp/npm-debug.log

how to solve?


Try resetting the permissions in your workspace. It sounds like it may be owned by root or another user. Run:

sudo chown -R $USER: $HOME

to reset ownership of all files in your home to your user.


But, nope, doesn’t work.


Thanks, it did help me with another issue.