我想把我的hexo网站推到我的github.When上--我试了一下这个hexo d
,上面写着ERROR Deployer not found: git
。所以我试着安装它,但得到了以下内容。
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
发布于 2015-12-06 04:44:05
它不工作,因为npm没有在这个文件夹中写入的权限。若要快速解决此问题,请使用sudo
运行此命令。
例如:
sudo npm install hexo-deployer-git --save
另外,不建议使用sudo运行npm,阅读官方的npm文档来修复npm权限:修正npm权限
https://stackoverflow.com/questions/34037897
复制相似问题