user1260928
user1260928

Reputation: 3429

error while creating a jhipster project on linux

When I m running

sudo yo jhipster

, I m getting this error at the end of the creation process:

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)

I have tried :

chown userxxx /home/userxxx/.config/configstore/insight-yo.yml

But this doesn't help.

If I m trying to create my project without sudo, it ends with :

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

it appears that the folder 01.1.3 doesn't exits, I have the folder 1.1.0

If anyone knows about this issue... I m using ubuntu 14.10

Thanks in advance.

Upvotes: 0

Views: 776

Answers (1)

Amr Mostafa
Amr Mostafa

Reputation: 23947

First of all, you don't need to use sudo with jhipster. Please try the following

  1. Delete your existing ~/.npm cache using sudo for one last time: sudo rm -r /home/userxxx/.npm
  2. This was the last time to use sudo for this task, all the following commands should be run as user userxxx without sudo
  3. Create your project directory and cd into it: mkdir /home/userxxx/my-jhipster-project && cd /home/userxxx/my-jhipster-project
  4. Generate your project using jhipster: yo jhipster

Upvotes: 4

Related Questions