EACCES error using Yeoman to install angular

I tried to run

yo angular --coffee --minsafe 

but i get this error

  Error: EACCES, permission denied '/Users/Basil/.config/configstore/insight-yo.yml' at Object.fs.openSync (fs.js:427:18) at Object.fs.writeFileSync (fs.js:966:15) at Object.create.all.set (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:39:7) at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:30:11) at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/insight.js:20:16) at Object.<anonymous> (/usr/local/lib/node_modules/yo/bin/yo:26:15) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) 

I checked the problems on Github and saw npm / yoman install generator-angular without sudo , but can't seem to get it working

node v0.10.17 npm v1.2.10

 find / -name 'yeoman' 

/Users/Basil/.node/node_modules/. Ben / Yeomen /Users/Basil/.node/node_modules/yeoman /Users/Basil/.node/node_modules/yeoman/bin/yeoman /Users/Basil/.node/node_modules/yeoman/node_modules/yeoman-generators/lib/generators / yeoman /Users/Basil/.npm/yeoman /Users/Basil/.npm/yeoman/0.9.6/package/bin/yeoman /Users/Basil/.npm/yeoman-generators/0.9.5/package/lib/ generators / yeoman

+4
source share
7 answers

I managed to solve this problem as follows:

 Sudo chown Basil /Users/Basil/.config/configstore/update-notifier-yo.yml 

If you run into this problem, try this by replacing "Basil" with your username

+11
source

You can simply use npm cache clean and clear the cache .

+7
source

Sudo chown Basil /Users/Basil/.config/configstore/update-notifier-yo.yml (Delete trailing chow). Replace Vasily with your username.

Sudo chown <yourusername> /Users/<yourusername>/.config/configstore/update-notifier-yo.yml Given that your username does not include a dollar sign.

This fixed the error when starting Yeoman:

 EACCES, permission denied '/Users/<yourusername>/.config/configstore/update-notifier-yo.yml' 
+1
source

If the above does not work, just delete all the files in the / Users / USER_NAME / .config / configstore / directory and run yo angular again. Replace USER_NAME with your username.

+1
source

I just fixed it on Windows. I did three things that I fixed, I'm not sure.

  • Run cmd as an administrator.

  • takeown /? this command is equivalent to chown (linux), but for windows.

  • cacls -cacls / E / T / G: F

  • just go to $ USER / Users / calvin / .config / configstore / and make the files unclosed.

it worked for me like a charm. I have been trying to fix this since many days.

0
source

It may be too late to answer, but in order to help others, changing both permissions (chmod) and owner (chown) is what worked for me on Ubuntu:

 sudo chmod g+rwx /home/myusername/.config/configstore sudo chown myusername /home/myusername/.config/configstore 
0
source

This worked for me:

 //Update npm to the latest version. Works for to upgrade 1.x to 2.x. $ npm install -g npm stable // Assign group permissions to the parent directory. $ chmod g+rwx /root /root/.config /root/.config/configstore 
0
source

Source: https://habr.com/ru/post/1501344/


All Articles