每次我尝试安装 mean.io 应用程序时都尝试过 npm 缓存清理, 尝试完全重新安装, 此刻快要疯了。我也在以管理员身份运行它。请帮忙
C:\Users\mmcelhinney\pitch_v1>npm install
-
> phantomjs@1.9.18 install C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs
> node install.js
Download already available at C:\Users\MMCELH~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip
Extracting zip contents
Removing C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs\lib\phantom
Copying extracted folder C:\Users\MMCELH~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1456238458670\phantomjs-1.9.8-windows -> C:\Users\mmcelhinney\pitch_v1\node_modules\phantom
s\lib\phantom
Phantom installation failed { [Error: EPERM, unlink 'C:\Users\MMCELH~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1456238458670\phantomjs-1.9.8-windows\phantomjs.exe']
errno: -4048,
code: 'EPERM',
path: 'C:\\Users\\MMCELH~1\\AppData\\Local\\Temp\\phantomjs\\phantomjs-1.9.8-windows.zip-extract-1456238458670\\phantomjs-1.9.8-windows\\phantomjs.exe' } Error: EPERM, unlink 'C:\Users\MMCELH~1\App
ata\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1456238458670\phantomjs-1.9.8-windows\phantomjs.exe'
at Error (native)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! phantomjs@1.9.18 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs@1.9.18 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! error rolling back Error: EPERM, unlink 'C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs\lib\phantom\phantomjs.exe'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EPERM, unlink 'C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs\lib\phantom\phantomjs.exe']
npm ERR! error rolling back errno: -4048,
npm ERR! error rolling back code: 'EPERM',
npm ERR! error rolling back path: 'C:\\Users\\mmcelhinney\\pitch_v1\\node_modules\\phantomjs\\lib\\phantom\\phantomjs.exe' }
调试日志的摘录:
6379 info phantomjs@1.9.18 执行安装脚本失败
使用 C:\Users\mmcelhinney\AppData\Roaming\npm-cache_locks\phantomjs-69c2bf63828d859c.lock 为 C:\Users\mmcelhinney\pitch_v1\node_modules\phantomjs 完成 6380 详细解锁
6381 详细堆栈错误:phantomjs@1.9.18 安装:node install.js
6381 详细堆栈退出状态 1
6381 EventEmitter 的详细堆栈。 (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
EventEmitter.emit (events.js:110:17) 处的 6381 详细堆栈
6381 ChildProcess 的详细堆栈。 (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:14:12)
ChildProcess.emit 的 6381 详细堆栈(events.js:110:17)
maybeClose 处的 6381 详细堆栈(child_process.js:1008:16)
Process.ChildProcess._handle.onexit (child_process.js:1080:5) 处的 6381 详细堆栈
最佳答案
在这里尝试我的解决方案 https://stackoverflow.com/a/35043377/5734480
根据您的操作系统,它可能会略有不同。
关于npm - NPM 安装错误 - Phantomjs@1.9.18,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35581118/