鍍金池/ 問答/Linux  HTML/ 關(guān)于npm install hexo-deployer-git --save出錯

關(guān)于npm install hexo-deployer-git --save出錯的問題

用Git安裝hexo-deployer-git出現(xiàn)報錯
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
搞了一晚上了很痛苦 求幫忙!

回答
編輯回答
替身

githubpages刪除之前創(chuàng)建的網(wǎng)頁

2017年6月1日 03:43
編輯回答
憶往昔

一般出現(xiàn)“Error: EPERM: operation not permitted”這種字眼的,很可能是權(quán)限不夠,嘗試在命令前面加sudo,以管理員的權(quán)限執(zhí)行命令。

2017年12月29日 11:23
編輯回答
選擇

請問樓主解決了嗎,我也遇到了這個問題,不過我是在window平臺下的,使用git bash 搭建的hexo框架,用hexo deploy命令時出錯,提示找不到git ,于是嘗試 用 npm install hexo-deployer-git --save命令就遇到和樓主同樣的錯誤了。

2018年3月14日 06:00