Skip to content

Instantly share code, notes, and snippets.

@Jay991
Created December 16, 2017 18:52
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Jay991/4275c5e5f11741a7f9b3743da3110976 to your computer and use it in GitHub Desktop.
Save Jay991/4275c5e5f11741a7f9b3743da3110976 to your computer and use it in GitHub Desktop.
Solution for Yoeman Error: EACCES, permission denied '/root/.config/configstore/insight-yo.json' You don't have access to this file.
You need to create a new user and give it sudo privleges:
$adduser username
Set password prompts:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for username
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
Give the new user sudo privledges
usermod -aG sudo username
Switch to new user
su - username
Then run
Yo command
@akshayarise
Copy link

not working in my case after using your solution.txt @Jay991

kumar@akshay-Dell-System-XPS-L502X:~$ yo meanjs
/usr/lib/node_modules/yo/node_modules/insight/node_modules/configstore/index.js:53
throw err;
^

Error: EACCES: permission denied, open '/home/kumar/.config/configstore/insight-yo.json'
You don't have access to this file.

at Object.fs.openSync (fs.js:663:18)
at Object.fs.readFileSync (fs.js:568:33)
at Configstore.get (/usr/lib/node_modules/yo/node_modules/insight/node_modules/configstore/index.js:34:26)
at new Configstore (/usr/lib/node_modules/yo/node_modules/insight/node_modules/configstore/index.js:27:45)
at new Insight (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:38:34)
at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:43:17)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)

@akshayarise
Copy link

hey @Jay991
problem is solved just doing with
chmod -R 777 /home/kumar/.config/configstore/insight-yo.json

@chrisjangl
Copy link

This worked - thanks!

@pradiptadas115
Copy link

This solved my problem , try it
chmod -R 777 /root/.config/insight-nodejs/

@rjdelrio
Copy link

rjdelrio commented Apr 6, 2021

the solution.text work fine to me :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment