Webpack一整天都工作得很好,当我添加一个新的图像时,它突然失败了。我更新了node和npm,但仍然得到以下错误。我该如何解决这个问题或使用替代方案呢?我尝试安装的其他镜像加载程序模块也出现了同样的错误。
74857 verbose stack Error: gifsicle@3.0.4 postinstall: `node lib/install.js`
74857 verbose stack Exit status 1
74857 verbose stack at EventEmitter.<anonymous> (C:\Users\mykod\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
74857 verbose stack at emitTwo (events.js:106:13)
74857 verbose stack at EventEmitter.emit (events.js:191:7)
74857 verbose stack at ChildProcess.<anonymous> (C:\Users\mykod\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
74857 verbose stack at emitTwo (events.js:106:13)
74857 verbose stack at ChildProcess.emit (events.js:191:7)
74857 verbose stack at maybeClose (internal/child_process.js:877:16)
74857 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
74858 verbose pkgid gifsicle@3.0.4
74859 verbose cwd C:\Users\mykod\Desktop\best-voted
74860 error Windows_NT 10.0.14393
74861 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\mykod\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
74862 error node v6.9.4
74863 error npm v4.3.0
74864 error code ELIFECYCLE
74865 error errno 1
74866 error gifsicle@3.0.4 postinstall: `node lib/install.js`
74866 error Exit status 1
74867 error Failed at the gifsicle@3.0.4 postinstall script 'node lib/install.js'.
74867 error Make sure you have the latest version of node.js and npm installed.
74867 error If you do, this is most likely a problem with the gifsicle package,
74867 error not with npm itself.
74867 error Tell the author that this fails on your system:
74867 error node lib/install.js
74867 error You can get information on how to open an issue for this project with:
74867 error npm bugs gifsicle
74867 error Or if that isn't available, you can get their info via:
74867 error npm owner ls gifsicle
74867 error There is likely additional logging output above.
74868 verbose exit [ 1, true ]发布于 2017-07-05 18:12:03
重新启动对我没有帮助。我的笔记本电脑上的权限有问题。我正在开发Ubuntu 16.04。
以下是解决方案:fixing npm permissions
我建议先看视频。至少先检查NPM的npm config get prefix目录,如果是/usr,则必须使用Option 2。
我已经用选项2的一步一步地解决了这个问题。
发布于 2017-02-10 14:08:36
我重新启动了我的计算机,并且能够安装它。视窗。
https://stackoverflow.com/questions/42152533
复制相似问题