Error running npm install

0

I just installed linux deepin on my pc, I installed node.js 10.0.6 together with npm 6.0.4. When I run npm install , it gives the error, so I executed the following command: npm audit fix --force and got the following result:

npm WARN using --force I sure hope you know what you are doing.

> [email protected] install /home/user/Documents/helloWorld/node_modules/fsevents
> node install

sh: 1: node: Permission denied

> [email protected] install /home/user/Documents/helloWorld/node_modules/node-sass
> node scripts/install.js

sh: 1: node: Permission denied

> [email protected] postinstall /home/user/Documents/helloWorld/node_modules/node-sass
> node scripts/build.js

sh: 1: node: Permission denied
added 200 packages from 137 contributors in 4.998s
fixed 0 of 0 vulnerabilities in 3520 scanned packages

How can I fix this?

    
asked by anonymous 19.08.2018 / 15:17

1 answer

1

You can try to run the command after assigning the appropriate permissions:

npm config set user 0
npm config set unsafe-perm true

And then, run your command:

npm audit fix --force

Source: Github issue

    
19.08.2018 / 15:51