NodeJS & NPM access error

After a fresh install  of NodeJS and NPM on my machine I wanted to install Express but kept running into an error:

npm ERR! Error: EACCES, open ‘/Users/devakone/.npm/64a534c1-express.lock’
npm ERR!  { [Error: EACCES, open ‘/Users/devakone/.npm/64a534c1-express.lock’]
npm ERR!   errno: 3,
npm ERR!   code: ‘EACCES’,
npm ERR!   path: ‘/Users/devakone/.npm/64a534c1-express.lock’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

It seems the error is a permissions issue as the .npm folder is owned by root and the ownership needs to be assigned back to your user. To fix it, since i installed nodejs under my username, was to change the permission of the ~/.npm folder to my

chown <USERNAME> ~/.npm

should get you up and running. Test both on Mac OS X and Ubuntu 12.10.

 

Published by Abou Kone

I am a front end architect with 10+ years of experience in web development. The best part of the process for me is converting ideas into code and solving the technical problems that come along. Alongside providing technical leadership and architectural support to projects spanning multiple industries, I am also experienced in leading discussions with designers, developers, and business stakeholders helping to guide teams in turning complex business workflows or data into easy-to-use web and mobile interfaces. I believe in delivering high quality products and am constantly looking into improving the process and tools use to achieve this goal.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: