Installing Ghost EACCES error

657 views Asked by At

I'm trying to install ghost but shows this error when building Bookshelf.js:

Installing dependencies npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/babel-cli/6.18.0/package'

sudo  npm install -g  ghost --allow-root
1

There are 1 answers

0
AudioBubble On BEST ANSWER

I solve using this:

sudo npm install -g --unsafe-perm ghost --allow-root 
npm config set prefix ~/npm
export PATH="$PATH:$HOME/npm/bin"