Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

server side rendering - gifsicle binary not found while starting reactjs app

We use gifsicle version 5.1.0 in package.json, but the application start throws the following error. It is expecting a binary gifsicle under node_modules/gifsicle/vendor folder but trying to start the application with "yarn dev" is not working. Any pointers would be helpful

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

The error seems to be as follows

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
question from:https://stackoverflow.com/questions/65887896/gifsicle-binary-not-found-while-starting-reactjs-app

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Migrating to 4.0.1 resolved the problem


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...