gpt4 book ai didi

ubuntu - npm install laravel-mix 在 ubuntu 上失败 - 在 gifsicle 上安装后失败

转载 作者:太空宇宙 更新时间:2023-11-03 17:07:20 25 4
gpt4 key购买 nike

我正在配置需要运行 npm run production 作为部署后脚本的实时 Web 服务器。为了成功运行这个命令,我需要成功安装 laravel-mix。在为 laravel mix 运行以下安装命令后,我收到无法解决的安装后错误。这对我来说是一个真正的障碍。我感谢有关如何解决的任何建议。

sudo npm i laravel-mix

> gifsicle@3.0.4 postinstall /my/path/node_modules/gifsicle
> node lib/install.js

module.js:545
throw err;
^

Error: Cannot find module '/my/path/node_modules/gifsicle/lib/install.js'
at Function.Module._resolveFilename (module.js:543:15)
at Function.Module._load (module.js:470:25)
at Function.Module.runMain (module.js:690:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:666:3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gifsicle@3.0.4 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gifsicle@3.0.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2018-03-10T16_22_00_506Z-debug.log

最佳答案

尝试

sudo rm -rf node_modules/
npm install

让我知道这是否有效。

关于ubuntu - npm install laravel-mix 在 ubuntu 上失败 - 在 gifsicle 上安装后失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49211380/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com