【问题标题】:npm install laravel-mix failing on ubuntu - postinstall fail on gifsiclenpm install laravel-mix 在 ubuntu 上失败 - postinstall 在 gifsicle 上失败
【发布时间】:2018-03-10 16:26:27
【问题描述】:

我正在配置一个需要运行 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

【问题讨论】:

    标签: ubuntu npm ubuntu-16.04 laravel-mix


    【解决方案1】:

    试试

    sudo rm -rf node_modules/
    npm install
    

    如果可行,请告诉我。

    【讨论】:

      猜你喜欢
      • 2017-11-11
      • 2020-05-25
      • 1970-01-01
      • 1970-01-01
      • 2017-05-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-19
      相关资源
      最近更新 更多