Unable to build sharp on node@9
See original GitHub issueWe’ve enabled node@9 on our travis build and it failed while trying to install sharp:
https://travis-ci.org/piobyte/flamingo/jobs/295751049#L5352-L5409
relevant error log:
gyp info spawn /opt/pyenv/shims/python2
gyp info spawn args [ '/home/travis/.nvm/versions/node/v9.0.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/travis/build/piobyte/flamingo/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/travis/.nvm/versions/node/v9.0.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/travis/.node-gyp/9.0.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/travis/.node-gyp/9.0.0',
gyp info spawn args '-Dnode_gyp_dir=/home/travis/.nvm/versions/node/v9.0.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/travis/.node-gyp/9.0.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/travis/build/piobyte/flamingo/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
/home/travis/.nvm/versions/node/v9.0.0/bin/node[6641]: ../src/node_zlib.cc:430:static void node::{anonymous}::ZCtx::Init(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
1: node::Abort() [node]
2: node::Assert(char const* const (*) [4]) [node]
3: 0x1251ea1 [node]
4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
5: 0xb74c3c [node]
6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
7: 0x157404e842fd
Aborted (core dumped)
gyp: Call to 'node -e "require('./binding').download_vips()"' returned exit status 134 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/travis/.nvm/versions/node/v9.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:135:13)
gyp ERR! stack at ChildProcess.emit (events.js:224:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 4.4.0-93-generic
gyp ERR! command "/home/travis/.nvm/versions/node/v9.0.0/bin/node" "/home/travis/.nvm/versions/node/v9.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/travis/build/piobyte/flamingo/node_modules/sharp
gyp ERR! node -v v9.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Can't install Sharp - node.js - Stack Overflow
I installed the required (6Gb!!) Visual Studio 2022 Build tools, but even after reboot it was still not working. Another thing I tried...
Read more >Unable to build sharp on node@9 - - Bountysource
We've enabled node@9 on our travis build and it failed while trying to install sharp: https://travis-ci.org/piobyte/flamingo/jobs/295751049#L5352-L5409.
Read more >sharp - npm
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images. Latest version: 0.31.3, ...
Read more >What does a dyslexic experience?
Our words have to make a perilous journey from our brains to our mouths, ... Yet, when I was a podiatrist and needed...
Read more >richardnguyen99 - Netlify Support Forums
Netlify constantly builds gatsby failed: "Cannot find module '. ... build/Release/sharp-linux-x64.node' 12:35:40 PM: Require stack: 12:35:40 PM: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The packaging scripts have been updated to include the Rust toolchain and the latest librsvg - see https://github.com/lovell/sharp-libvips/commit/d4d2019a7d9ed7a0adea036d19a4816de02c5da7 - so you can expect v0.19.0 within the next day or so.
@ram-you When libvips v8.6.0 is released the prebuilt binaries can be created and some final leak testing will be carried out. This issue is tagged as v0.19.0 so you will be alerted when it is published.