4thSpace
4thSpace

Reputation: 44332

How to avoid NPM EACCES: permission denied?

I'm getting a ton of

EACCES: permission denied

and

checkPermissions

errors when running npm i -g npm.

It is suggesting:

Please try running this command again as root/Administrator

I am the admin so what does it want?

Upvotes: 1

Views: 539

Answers (2)

vish213
vish213

Reputation: 786

I encounter this very often. Often this is the case when node_modules folder to be updated by npm is being accessed from some process. Try closing any opened folder in File Explorer, closing any running ng serve session and other opened terminal. Also close any opened UI of your application in web-browser. Don't know what exactly causes this issue, but it's always solved by one or the other of the above methods.

Upvotes: 1

4thSpace
4thSpace

Reputation: 44332

The solution is to proceed any command with sudo.

Upvotes: 0

Related Questions