I get an error while running yo webapp as "Easy with the sudo. Yeoman is the master around here"
Please help me out. I followed the same instructions in the yoeman.io website.
Without sudo , on running in /usr/node/ with the directory changed to 777 with chmod,
Error: EACCES, permission denied '/home/manish/.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 (/home/manish/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:39:7) at Object.Configstore (/home/manish/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:30:11) at new Insight (/home/manish/local/lib/node_modules/yo/node_modules/insight/lib/insight.js:20:16) at Object. (/home/manish/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)
This happens because you must be trying to start your application as root.
See this for more information: https://github.com/passy/yo/commit/d33e7a67d74343d836a14881b17b3072b92f2532
If you're starting your applciation by running:
sudo node app.js
Try doing this instead:
node app.js
I.e. this won't try to start the application as root.
Same goes for scaffolding, if you're trying to create your application. you shouldn't need sudo for that if you're doing that under your home (~/) directory.
There's a Gist here with a selection of shell scripts to help you install Node and NPM without requiring sudo permissions:
So running yo ? gives the error above - maybe like for me it installed ~/Users/yourusername/.config/configstore/insight-yo.yml with the root permissions and this needs chowning to the name of the user.
chown yourusername ~/Users/yourusername/.config/configstore/insight-yo.yml
This was my issue and may be a part of the full solution given here https://gist.github.com/isaacs/579814