Solvedangular cli Installation error: permission denied for node-sas
✔️Accepted Answer
sudo npm install -g --unsafe-perm --verbose @angular/cli
Other Answers:
I was getting the same frustrating error, it's definitely a permissions issue. If you've been using NPM with sudo for a while and don't want to go through the hassle of reinstalling everything (at least not right in the middle of a project) I think I found a quick fix.
node-sass refused to install whether I used sudo or not, so I looked at my project directory - ls -ahl
and saw that my node_modules directory was set to user root I'm assuming as a consequence of using sudo. I ran a sudo chown yourname:yourgroup node_modules
where yourname/yourgroup is the name/group of all your other non-root controlled files and then ran (without sudo) npm i node-sass -D
This did the trick. Just a suggested shortcut.
Run following commands
npm i -g npm-check-updates
npm-check-updates -u
npm install
" npm install -g --unsafe-perm node-sass " . solved the issue.
Agreed, check out: https://docs.npmjs.com/getting-started/fixing-npm-permissions
Installation error (node-sass) with:
node version 8.1.2
npm version 5.0.3
I recently updated node from 7.5.0 to 8.1.2 (with nvm). Installing the latest @angular/cli now results in this error:
The log given by the failure.