0

I want to push my hexo site on my github.When I tried this hexo d and it said ERROR Deployer not found: git. So I tried to install it, but got what follows.

clatisus@clatisus-GL552JX:~$ npm install hexo-deployer-git --save
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.5
npm ERR! Linux 3.19.0-33-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "hexo-deployer-git" "--save"
npm ERR! node v0.11.2
npm ERR! npm  v3.5.1
npm ERR! path /home/clatisus/node_modules/.staging
npm ERR! code EACCES
npm ERR! errno 3

npm ERR! Error: EACCES, mkdir '/home/clatisus/node_modules/.staging'
npm ERR!  { [Error: EACCES, mkdir '/home/clatisus/node_modules/.staging']
npm ERR!   stack: 'Error: EACCES, mkdir \'/home/clatisus/node_modules/.staging\'',
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/home/clatisus/node_modules/.staging' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/clatisus/npm-debug.log
clatisus
  • 3
  • 2

1 Answers1

0

It doesn't work because npm hasn't permissions to write in this folder. To quickly fix this issue, run this command with sudo.

E.g :

sudo npm install hexo-deployer-git --save

Also, running npm with sudo is not recommended, read official npm documentation to fix npm permissions: fixing npm permissions

Community
  • 1
  • 1
Louis Barranqueiro
  • 10,058
  • 6
  • 42
  • 52