关于npm install hexo-deployer-git --save出错的问题

新手上路,请多包涵

用Git安装hexo-deployer-git出现报错
npm ERR! path D:hexoblognode_modulesfseventsnode_modulesperformance-nowlibperformance-now.js
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'D:hexoblognode_modulesfseventsnode_modulesperformance-nowlibperformance-now.js'
npm ERR! { Error: EPERM: operation not permitted, unlink 'D:hexoblognode_modulesfseventsnode_modulesperformance-nowlibperformance-now.js'
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink 'D:\hexo\blog\node_modules\fsevents\node_modules\performance-now\lib\performance-now.js'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'D:\hexo\blog\node_modules\fsevents\node_modules\performance-now\lib\performance-now.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! F:Userslenovo.npm.cachecnpm_logs2017-09-15T12_26_01_810Z-debug.log

deploy:
type: git
repo: git@github.com:sam694260665/sam694260665.github.io.git
branch:gh-pages
搞了一晚上了很痛苦 求帮忙!

阅读 11.3k
4 个回答
✓ 已被采纳新手上路,请多包涵

githubpages删除之前创建的网页

一般出现“Error: EPERM: operation not permitted”这种字眼的,很可能是权限不够,尝试在命令前面加sudo,以管理员的权限执行命令。

新手上路,请多包涵

请问楼主解决了吗,我也遇到了这个问题,不过我是在window平台下的,使用git bash 搭建的hexo框架,用hexo deploy命令时出错,提示找不到git ,于是尝试 用 npm install hexo-deployer-git --save命令就遇到和楼主同样的错误了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进