当我跑步时
sudo yo jhipster
,我在创建过程结束时收到此错误:
Error: EACCES, permission denied '/home/userxxx/.config/configstore/insight-yo.yml'
You don't have access to this file.
at Object.fs.openSync (evalmachine.<anonymous>:438:18)
at Object.fs.readFileSync (evalmachine.<anonymous>:289:15)
at Object.create.all.get (/usr/lib/node_modules/yo/node_modules/configstore/configstore.js:33:29)
at Object.Configstore (/usr/lib/node_modules/yo/node_modules/configstore/configstore.js:26:44)
at new Insight (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:26:34)
at Object.<anonymous> (/usr/lib/node_modules/yo/cli.js:123: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)
我试过了:
chown userxxx /home/userxxx/.config/configstore/insight-yo.yml
但这并没有帮助。
如果我试图创建没有sudo的项目,它结束于:
npm ERR! Error: EACCES, mkdir '/home/userxxx/.npm/each-async/0.1.3'
npm ERR! { [Error: EACCES, mkdir '/home/userxxx/.npm/each-async/0.1.3']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/userxxx/.npm/each-async/0.1.3',
npm ERR! parent: 'grunt-svgmin' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.16.0-23-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/userxxx/dev/workspace/blankjhipster
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /home/userxxx/.npm/each-async/0.1.3
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/userxxx/.npm/each-async/0.1.3'
npm ERR! not ok code 0
看来文件夹01.1.3没有退出,我有文件夹1.1.0
如果有人知道这个问题...... 我正在使用ubuntu 14.10
提前致谢。
答案 0 :(得分:4)
首先,您不需要将sudo
与jhipster一起使用。请尝试以下
~/.npm
缓存:sudo rm -r /home/userxxx/.npm
userxxx
运行而不使用sudo cd
:mkdir /home/userxxx/my-jhipster-project && cd /home/userxxx/my-jhipster-project
yo jhipster