npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

angular 8 npm problem

akash@kaintura:~/CRUD/angular$ npm install ng2-slim-loading-bar --save
Unhandled rejection Error: EACCES: permission denied, mkdir '/home/akash/.npm/_cacache/index-v5/2b/d3’

why is this happening?
on angular 8


There is an open issue with installing global packages using sudo leaving behind files with the wrong ownership.

The short version is run this to fix the ownership, then try your install again:

sudo chown -R $(whoami) ~/.npm
npm install ng2-slim-loading-bar --save