Install Yeoman:
$ npm install -g yo
  I see an issue when I tried to run the command 'yo'.
$ yo
 
Error: EACCES, permission denied '/root/.config/configstore/insight-yo.json'
You don't have access to this file.
    at Object.fs.openSync (evalmachine.<anonymous>:432:18)
    at Object.fs.readFileSync (evalmachine.<anonymous>:286:15)
    at Object.create.all.get (/usr/local/lib/node_modules/yo/node_modules/configstore/index.js:27:26)
    at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/configstore/index.js:20:44)
    at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/index.js:37:34)
    at Object.<anonymous> (/usr/local/lib/node_modules/yo/lib/cli.js:130: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)
Finally, fixed the issue with:
// 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

分类: web

标签: