Topic: PERMISSIONS ISSUE DURING INSTALLATION
rich@cfsnap.com pro asked 7 years ago
gyp verb get node dir target node version installed: 8.9.4 gyp verb build dir attempting to create "build" dir: /Users/rich/Desktop/angular02/node_modules/node-sass/build gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/rich/Desktop/angular02/node_modules/node-sass/build' gyp ERR! System Darwin 15.6.0... But here's the problem: the error message says permission denied for the mkdir command on the directory, so I simply went and set the permissions on my project folder (and all enclosed items) to access for everyone (I actually did this right after I created the Angular project "ng new myProjectName --style-scss"). But the error still keeps coming and the install fails, and even running ng serve fails (complains it can't find module node-sass, which is what's being blocked from being created). What else can I do besides manually setting my project folder's permissions to make this installation work? Yes, I've uninstalled, reinstalled Node/CLI/Angular.... I've run everything as sudo.... BTW I also get a similar issue when trying to install the Free version (I've been trying to install the Pro) Thanks, Rich My configuration:
Angular CLI: 1.5.0 Node: 8.9.4 OS: darwin x64 Angular: 5.2.0 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router @angular/cli: 1.5.0 @angular-devkit/build-optimizer: 0.0.36 @angular-devkit/core: 0.0.22 @angular-devkit/schematics: 0.0.42 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.8.0 @schematics/angular: 0.1.11 @schematics/schematics: 0.0.11 typescript: 2.5.3 webpack: 3.10.0
Dawid Adach pro answered 7 years ago
rich@cfsnap.com pro answered 7 years ago
Damian Gemza staff answered 7 years ago
Rich, i've read your's link. I have few solutions for you that can help solve problem.
First - Try to do something like this:
I run chown it's worked
sudo chown -r XXX /usr/lib/node_modules/
or sudo chown -r XXX /usr/lib/node_modules/@angular/
if not it might chgrp
sudo chgrp -r XXX /usr/lib/node_modules/
If not, please try this:
1.) Fix the permissions by changing the ownership and group of/usr/lib/node_modules/
to your user account:sudo chown -r XXX /usr/lib/node_modules/
andsudo chgrp -r XXX /usr/lib/node_modules/
2.)sudo npm i -g @angular/cli
3.)sudo rm -fr /usr/lib/node_modules/@angular/cli/
4.)sudo chown -r XXX /usr/lib/node_modules/@angular/
5.)sudo chgrp -r XXX /usr/lib/node_modules/@angular/
6.)npm i -g @angular/cli
If second method won't help you too, last thing is you to read carefully these two links: https://github.com/angular/angular-cli/issues/6800 and https://docs.npmjs.com/getting-started/fixing-npm-permissions
This should fix your's problem if you will do everything in right way :) GOOD LUCK!
Best Regards,
Damian
rich@cfsnap.com pro answered 7 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: Yes