首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >启动reactjs应用程序时找不到gifsical二进制文件

启动reactjs应用程序时找不到gifsical二进制文件
EN

Stack Overflow用户
提问于 2021-01-25 23:41:48
回答 1查看 415关注 0票数 1

我们在package.json中使用gifsicle5.1.0版,但应用程序启动时抛出以下错误。它期望在node_modules/ gifsicle文件夹下有一个二进制gifsicle.js,但尝试使用"yarn dev“启动应用程序并不起作用。任何指针都会有帮助。

代码语言:javascript
复制
webpack:///./node_modules/slick-carousel/slick/ajax-loader.gif?:1
throw new Error("Module build failed (from ./node_modules/image-webpack-loader/index.js):\nError: spawn /home/user/webapp/node_modules/gifsicle/vendor/gif
sicle ENOENT\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n    at onErrorNT (internal/child_process.js:465:16)\n    at processTicksAndRejections (inte
rnal/process/task_queues.js:80:21)");

错误似乎如下所示

代码语言:javascript
复制
Output:
⚠ Response code 404 (Not Found)
  ⚠ gifsicle pre-build test failed
  ℹ compiling from source
  ✖ Error: Command failed: /bin/sh -c ./configure --disable-gifview --disable-gifdiff --prefix="/home/user/webapp/node_modules/gifsicle/vendor" --bindir="
/home/user/webapp/node_modules/gifsicle/vendor"
    config.status: error: in `/tmp/7314af85-eb99-48d5-963f-47a8d2e141a1':
    config.status: error: Something went wrong bootstrapping makefile fragments
        for automatic dependency tracking.  Try re-running configure with the
        '--disable-dependency-tracking' option to at least be able to build
        the package (albeit without support for automatic dependency tracking).
    See `config.log' for more details

config.log contains the following

gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
configure:3384: $? = 0
configure:3373: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3384: $? = 1
configure:3373: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:3384: $? = 1
configure:3404: checking whether the C compiler works
configure:3426: gcc    conftest.c  >&5
configure:3430: $? = 0
configure:3478: result: yes
configure:3481: checking for C compiler default output file name
configure:3483: result: a.out

        Environment:
        nvm use 14.15.1
        Ubuntu 20.04 LTS
EN

回答 1

Stack Overflow用户

发布于 2021-01-26 12:35:33

迁移到4.0.1解决了这个问题

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65887896

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档