Unsolved 1.19.5 - vips/vips8 problem


  • Since v1.19.4 I have the following problem.

    npm ERR! code 1
    npm ERR! path /home/user_radforum/nodebb/node_modules/sharp
    npm ERR! command failed
    npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
    npm ERR! sharp: Using cached /home/user_radforum/.npm/_libvips/libvips-8.12.2-linux-x64.tar.br
    npm ERR! sharp: Integrity check passed for linux-x64
    npm ERR! make: Entering directory '/home/user_radforum/nodebb/node_modules/sharp/build'
    npm ERR!   CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
    npm ERR!   AR(target) Release/obj.target/../node-addon-api/nothing.a
    npm ERR!   COPY Release/nothing.a
    npm ERR!   TOUCH Release/obj.target/libvips-cpp.stamp
    npm ERR!   CXX(target) Release/obj.target/sharp-linux-x64/src/common.o
    npm ERR! make: Leaving directory '/home/user_radforum/nodebb/node_modules/sharp/build'
    npm ERR! node:internal/modules/cjs/loader:936
    npm ERR!   throw err;
    npm ERR!   ^
    npm ERR! 
    npm ERR! Error: Cannot find module './index'
    npm ERR! Require stack:
    npm ERR! - /home/user_radforum/nodebb/node_modules/.bin/rc
    npm ERR! - /home/user_radforum/nodebb/node_modules/.bin/prebuild-install
    npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    npm ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19)
    npm ERR!     at require (node:internal/modules/cjs/helpers:102:18)
    npm ERR!     at Object.<anonymous> (/home/user_radforum/nodebb/node_modules/.bin/rc:2:10)
    npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1103:14)
    npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
    npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    npm ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19) {
    npm ERR!   code: 'MODULE_NOT_FOUND',
    npm ERR!   requireStack: [
    npm ERR!     '/home/user_radforum/nodebb/node_modules/.bin/rc',
    npm ERR!     '/home/user_radforum/nodebb/node_modules/.bin/prebuild-install'
    npm ERR!   ]
    npm ERR! }
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using [email protected]
    npm ERR! gyp info using [email protected] | linux | x64
    npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
    npm ERR! gyp http GET https://nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz
    npm ERR! gyp http 200 https://nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz
    npm ERR! gyp http GET https://nodejs.org/download/release/v16.14.2/SHASUMS256.txt
    npm ERR! gyp http 200 https://nodejs.org/download/release/v16.14.2/SHASUMS256.txt
    npm ERR! gyp info spawn /usr/bin/python3
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
    npm ERR! gyp info spawn args   'binding.gyp',
    npm ERR! gyp info spawn args   '-f',
    npm ERR! gyp info spawn args   'make',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   '/home/user_radforum/nodebb/node_modules/sharp/build/config.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   '/home/user_radforum/.cache/node-gyp/16.14.2/include/node/common.gypi',
    npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
    npm ERR! gyp info spawn args   '-Dvisibility=default',
    npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/user_radforum/.cache/node-gyp/16.14.2',
    npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
    npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/user_radforum/.cache/node-gyp/16.14.2/<(target_arch)/node.lib',
    npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/user_radforum/nodebb/node_modules/sharp',
    npm ERR! gyp info spawn args   '-Dnode_engine=v8',
    npm ERR! gyp info spawn args   '--depth=.',
    npm ERR! gyp info spawn args   '--no-parallel',
    npm ERR! gyp info spawn args   '--generator-output',
    npm ERR! gyp info spawn args   'build',
    npm ERR! gyp info spawn args   '-Goutput_dir=.'
    npm ERR! gyp info spawn args ]
    npm ERR! gyp info spawn make
    npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    npm ERR! ../src/common.cc:24:10: fatal error: vips/vips8: No such file or directory
    npm ERR!    24 | #include <vips/vips8>
    npm ERR!       |          ^~~~~~~~~~~~
    npm ERR! compilation terminated.
    npm ERR! make: *** [sharp-linux-x64.target.mk:139: Release/obj.target/sharp-linux-x64/src/common.o] Error 1
    npm ERR! gyp ERR! build error 
    npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
    npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
    npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
    npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    npm ERR! gyp ERR! System Linux 5.10.0-12-amd64
    npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    npm ERR! gyp ERR! cwd /home/user_radforum/nodebb/node_modules/sharp
    npm ERR! gyp ERR! node -v v16.14.2
    npm ERR! gyp ERR! node-gyp -v v8.4.1
    npm ERR! gyp ERR! not ok
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/user_radforum/.npm/_logs/2022-03-20T07_15_33_283Z-debug-0.log
    Error installing dependencies!
    message: Command failed: npm install --production
    stdout: null
    stderr: null
    

    I always solve it this way, but I think this is not the correct solution.

    npm install --build-from-source sharp
    npm install --build-from-source libvips
    

    After that, I can successfully perform the normal upgrade process.

    My node version is v16.14.2

  • GNU/Linux Admin

    @FrankM Seems an issue with sharp and libvips, so upstream from NodeBB. Unfortunately nothing we can do here.


Suggested Topics

| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.