npm install ghost失败,代码为EPERM errno -4048 syscall重命名(在Windows上) [英] npm install ghost fails with code EPERM errno -4048 syscall rename (on Windows)

查看:1141
本文介绍了npm install ghost失败,代码为EPERM errno -4048 syscall重命名(在Windows上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装 npm 3.8.x版本的Ghost的过程中,发生以下错误:

During the install of Ghost with npm version 3.8.x, the following errors occur:

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8
npm WARN Gonzah@0.0.1 No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\aosman\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "ghost"
npm ERR! node v4.3.2
npm ERR! npm  v3.8.1
npm ERR! path D:\elastc-app\node_modules\ghost
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'D:\elastc-app\node_modules\ghost' -> 'D:\elastc-app\node_modules\.ghost.DELETE'
npm ERR!     at moveAway (C:\Users\aosman\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:38:5)
npm ERR!     at destStatted (C:\Users\aosman\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:27:7)
npm ERR!     at FSReqWrap.oncomplete (fs.js:82:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'D:\elastc-app\node_modules\ghost' -> 'D:\elastc-app\node_modules\.ghost.DELETE'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, rename 'D:\elastc-app\node_modules\ghost' -> 'D:\elastc-app\node_modules\.ghost.DELETE'] parent: 'Gonzah' }
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!     D:\elastc-app\npm-debug.log

经过一天的研究以解决这个问题,它显然与npm v3.8中的一个已知错误有关( https://github.com/npm/npm/issues/10379#issuecomment-163316532 ).

After searching for a day to figure this out, it's apparently tied to a known bug in npm v3.8 (https://github.com/npm/npm/issues/10379#issuecomment-163316532).

推荐答案

解决方案是暂时将npm降级到v2 以执行安装.这样做:

The solution is to temporarily downgrade npm to v2 to perform the install. Do this:

npm uninstall npm -g
npm install npm@2 -g
npm install ghost

然后当然可以随时将npm更新为最新版本.

Then of course feel free to update npm to the latest version again.

这篇关于npm install ghost失败,代码为EPERM errno -4048 syscall重命名(在Windows上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆