【YEOMAN】执行yo命令,报EACCES: permission denied, mkdir '/root/.config/configstore'
基础环境:CentOS7、Nodejs6.0之上,yo:1.8.4
在执行yo初始化webapp时,报错,错误内容如下:
Error: EACCES: permission denied, mkdir '/root/.config/configstore' at Error (native) at Object.fs.mkdirSync (fs.js:916:18) at Function.sync (/usr/local/lib/node_modules/yo/node_modules/mkdirp/index.js:71:13) at Object.create.all.get (/usr/local/lib/node_modules/yo/node_modules/configstore/index.js:38:13) at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/configstore/index.js:27: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:172:11) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32)
具体操作如下:
[root@iZ289zd8c52Z yeomansv]# cd /root/.config/ [root@iZ289zd8c52Z .config]# cd configstore -bash: cd: configstore: No such file or directory [root@iZ289zd8c52Z .config]# mkdir -p /root/.config/configstore [root@iZ289zd8c52Z .config]# chmod g+rwx /root /root/.config /root/.config/configstore