Roy G
Roy G

Reputation: 949

npm permission denied - node-sass

I run npm command on Ubuntu and get permission denied

sudo npm install node-sass

EACCES: permission denied, access '/node_modules/node-sass'

I try to run it as a root user or with sudo and as global.

The project folder has public(777) access.

  • nodejs version - v10.8.0
  • npm version - 6.3.0

Also, the unsafe package does not solve the problem

sudo npm install --unsafe-perm node-sass

fixing-npm-permissions don't solve

https://docs.npmjs.com/getting-started/fixing-npm-permissions

Upvotes: 0

Views: 1990

Answers (1)

Harsh
Harsh

Reputation: 1695

I have had this problem before, it has to do with your package.lock file and below are the steps which I followed.

  • Delete node_modules folder
  • Delete your package.lock file or copy it again from your repo.
  • Start NPM install again.

Upvotes: 1

Related Questions