0

I was getting an EACCES error from NPM so I followed these directions to fix it by changing the default directory: https://docs.npmjs.com/getting-started/fixing-npm-permissions Using the test they gave at the end, I installed jshint globally without error.

However, when I try to build an Angular project

sudo ng new ProjectName --style=scss --routing

I get a lot of errors, the first one being

Unable to save binary /home/addem/Web/ExplainAngular/node_modules/node-sass/vendor/linux-x64-57 : { Error: EACCES: permission denied, mkdir '/home/addem/Web/ExplainAngular/node_modules/node-sass/vendor'

I then followed these instructions: Error: EACCES: permission denied

Still doesn't fix the problem, so at this point I'm not sure what to do.

Addem
  • 3,635
  • 3
  • 35
  • 58

1 Answers1

0

I discovered the cause. I had installed the Angular CLI before I followed the fixes above, and therefore the Angular CLI did not have all the ... "stuff" it needed. I guess maybe dependencies or packages. Anyway, after doing the above fixes and then running

npm install -g @angular/cli

I can now create the project without errors.

Addem
  • 3,635
  • 3
  • 35
  • 58