我在向Laravel项目安装NPM时遇到问题。我写了npm install
但我最终得到了这个错误,实际上我更新了Node和NPM重新启动的计算机,但没有任何作用。
我作为管理员在CMD中运行命令后的日志:
484 verbose unlock done using C:\Users\Juraj\AppData\Roaming\npm-cache\_locks\staging-c4bd3be9cd8785e1.lock for C:\Users\Juraj\Desktop\CMS\CMS\node_modules\.staging
485 silly rollbackFailedOptional Starting
486 silly rollbackFailedOptional Finishing
487 silly runTopLevelLifecycles Finishing
488 silly install printInstalled
489 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0
(node_modules\chokidar\node_modules\fsevents):
490 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
491 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
491 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
491 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
491 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
492 verbose stack Error: gifsicle@3.0.4 postinstall: `node lib/install.js`
492 verbose stack Exit status 1
492 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
492 verbose stack at emitTwo (events.js:106:13)
492 verbose stack at EventEmitter.emit (events.js:191:7)
492 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
492 verbose stack at emitTwo (events.js:106:13)
492 verbose stack at ChildProcess.emit (events.js:191:7)
492 verbose stack at maybeClose (internal/child_process.js:891:16)
492 verbose stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:226:5)
493 verbose pkgid gifsicle@3.0.4
494 verbose cwd C:\Users\Juraj\Desktop\CMS\CMS
495 error Windows_NT 6.1.7601
496 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
497 error node v6.11.1
498 error npm v3.10.10
499 error code ELIFECYCLE
500 error gifsicle@3.0.4 postinstall: `node lib/install.js`
500 error Exit status 1
501 error Failed at the gifsicle@3.0.4 postinstall script 'node lib/install.js'.
501 error Make sure you have the latest version of node.js and npm installed.
501 error If you do, this is most likely a problem with the gifsicle package,
501 error not with npm itself.
501 error Tell the author that this fails on your system:
501 error node lib/install.js
501 error You can get information on how to open an issue for this project with:
501 error npm bugs gifsicle
501 error Or if that isn't available, you can get their info via:
501 error npm owner ls gifsicle
501 error There is likely additional logging output above.
502 verbose exit [ 1, true ]
答案 0 :(得分:0)
我刚刚删除了节点8,现在安装节点6就是一切都好了。