簡體   English   中英

npm install ghost失敗,代碼為EPERM errno -4048 syscall重命名(在Windows上)

[英]npm install ghost fails with code EPERM errno -4048 syscall rename (on Windows)

使用npm 3.8.x安裝Ghost的過程中,發生以下錯誤:

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 )中的一個已知錯誤有關。

解決方案是將npm暫時降級到v2以執行安裝。 做這個:

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

然后當然可以隨時將npm更新為最新版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM