SOLVED Update to v.1.18.5 don't work


  • Log -> https://pastebin.com/H2hJuXGZ

    ~/nodebb$ ./nodebb upgrade
     
    Updating NodeBB...
     
    1. Updating package.json file with defaults...  OK
     
    2. Bringing base dependencies up to date...  started
    npm WARN old lockfile 
    npm WARN old lockfile The package-lock.json file was created with an old version of npm,
    npm WARN old lockfile so supplemental metadata must be fetched from the registry.
    npm WARN old lockfile 
    npm WARN old lockfile This is a one-time fix-up, please be patient...
    npm WARN old lockfile 
    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.11.3-linux-x64.tar.br
    npm ERR! make: Verzeichnis „/home/user_radforum/nodebb/node_modules/sharp/build“ wird betreten
    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: Verzeichnis „/home/user_radforum/nodebb/node_modules/sharp/build“ wird verlassen
    npm ERR! internal/modules/cjs/loader.js:905
    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 (internal/modules/cjs/loader.js:902:15)
    npm ERR!     at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    npm ERR!     at Module.require (internal/modules/cjs/loader.js:974:19)
    npm ERR!     at require (internal/modules/cjs/helpers.js:93:18)
    npm ERR!     at Object.<anonymous> (/home/user_radforum/nodebb/node_modules/.bin/rc:2:10)
    npm ERR!     at Module._compile (internal/modules/cjs/loader.js:1085:14)
    npm ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    npm ERR!     at Module.load (internal/modules/cjs/loader.js:950:32)
    npm ERR!     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    npm ERR!     at Module.require (internal/modules/cjs/loader.js:974: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 node-gyp@8.3.0
    npm ERR! gyp info using node@14.18.1 | linux | x64
    npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
    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/14.18.1/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/14.18.1',
    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/14.18.1/<(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: Datei oder Verzeichnis nicht gefunden
    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] Fehler 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 (events.js:400:28)
    npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
    npm ERR! gyp ERR! System Linux 5.10.0-9-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 v14.18.1
    npm ERR! gyp ERR! node-gyp -v v8.3.0
    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/2021-10-28T20_35_05_720Z-debug.log
    Error installing dependencies!
    message: Command failed: npm install --production
    stdout: null
    stderr: null
    Error occurred during upgrade: Error: Command failed: npm install --production
        at checkExecSyncError (child_process.js:790:11)
        at Object.execSync (child_process.js:863:15)
        at Object.installAll (/home/user_radforum/nodebb/src/cli/package-install.js:73:9)
        at Object.handler (/home/user_radforum/nodebb/src/cli/upgrade.js:21:19)
        at runSteps (/home/user_radforum/nodebb/src/cli/upgrade.js:54:16)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
        at async Object.runUpgrade [as upgrade] (/home/user_radforum/nodebb/src/cli/upgrade.js:84:3)
    (node:76796) UnhandledPromiseRejectionWarning: Error: Command failed: npm install --production
        at checkExecSyncError (child_process.js:790:11)
        at Object.execSync (child_process.js:863:15)
        at Object.installAll (/home/user_radforum/nodebb/src/cli/package-install.js:73:9)
        at Object.handler (/home/user_radforum/nodebb/src/cli/upgrade.js:21:19)
        at runSteps (/home/user_radforum/nodebb/src/cli/upgrade.js:54:16)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
        at async Object.runUpgrade [as upgrade] (/home/user_radforum/nodebb/src/cli/upgrade.js:84:3)
    (Use `node --trace-warnings ...` to show where the warning was created)
    (node:76796) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
    (node:76796) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    

    npm

    ~/nodebb$ npm -v
    8.1.2
    

    node

    ~/nodebb$ node -v
    v14.18.1
    

    Can someone help me? Thanks.

  • Global Moderator Plugin & Theme Dev

    @frankm what platform are you on? You should probably check the sharp install instructions.

    Also please embed the log in a code block directly in the future.


  • @pitaj Debian 11 Bullseye

  • Global Moderator Plugin & Theme Dev

    Try running

    npm install --production
    

    manually, just to make sure it wasn't NodeBB.

    You should get the same error. Then try the troubleshooting instructions here:


  • I was already able to solve the problem. Here is what I did.

    mv package.json /home/USER
    mv node_modules/ /home/USER
    npm install
    ./nodebb upgrade
    

    Now it works.

    @PitaJ Thanks

  • Topic has been marked as solved  FrankM FrankM 
  • Topic has been marked as unsolved  FrankM FrankM 

  • Ok, so many trouble..... with sharp again and again....

    I have done an update and edit package.json to

           "sharp": "0.29.1",
    

    sharp with version 0.29.2 don't build on my Debian 11 Bullseye and i don't know why.

    Updating NodeBB...
    
    1. Updating package.json file with defaults...  OK
    
    2. Bringing base dependencies up to date...  started
    
    > sharp@0.29.2 install /home/user_radforum/nodebb_test/node_modules/sharp
    > (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
    
    sharp: Using cached /home/user_radforum/.npm/_libvips/libvips-8.11.3-linux-x64.tar.br
    internal/modules/cjs/loader.js:905
      throw err;
      ^
    
    Error: Cannot find module './index'
    Require stack:
    - /home/user_radforum/nodebb_test/node_modules/.bin/rc
    - /home/user_radforum/nodebb_test/node_modules/.bin/prebuild-install
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
        at Function.Module._load (internal/modules/cjs/loader.js:746:27)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:93:18)
        at Object.<anonymous> (/home/user_radforum/nodebb_test/node_modules/.bin/rc:2:10)
        at Module._compile (internal/modules/cjs/loader.js:1085:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
        at Module.load (internal/modules/cjs/loader.js:950:32)
        at Function.Module._load (internal/modules/cjs/loader.js:790:12)
        at Module.require (internal/modules/cjs/loader.js:974:19) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
        '/home/user_radforum/nodebb_test/node_modules/.bin/rc',
        '/home/user_radforum/nodebb_test/node_modules/.bin/prebuild-install'
      ]
    }
    make: Verzeichnis „/home/user_radforum/nodebb_test/node_modules/sharp/build“ wird betreten
      CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
      AR(target) Release/obj.target/../node-addon-api/nothing.a
      COPY Release/nothing.a
      TOUCH Release/obj.target/libvips-cpp.stamp
      CXX(target) Release/obj.target/sharp-linux-x64/src/common.o
    ../src/common.cc:24:10: fatal error: vips/vips8: Datei oder Verzeichnis nicht gefunden
       24 | #include <vips/vips8>
          |          ^~~~~~~~~~~~
    compilation terminated.
    make: *** [sharp-linux-x64.target.mk:139: Release/obj.target/sharp-linux-x64/src/common.o] Fehler 1
    make: Verzeichnis „/home/user_radforum/nodebb_test/node_modules/sharp/build“ wird verlassen
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2
    

    Please help me 😉


  • Now i have done

    npm install --unsafe-perm sharp@0.29.2
    

    This file i have copied into node_modules

    ./nodebb upgrade
    

    And now it works. But i don't understand the problem.... 😞

  • Global Moderator Plugin & Theme Dev

    Are you installing as root?


  • @pitaj My normal update process is performed as a user. This is terminated with the error, see above.

    I was only able to install the version sharp@0.29.2 as root, with the --unsafe-perm option.

    After that I was able to copy sharp. NodeBB does not run as root on the system.

  • Global Moderator Plugin & Theme Dev

    Maybe it was just installing it somewhere else? Did you try deleting node_modules and then running npm install?


  • Tested it this morning with my second forum like this.

    ./nodebb upgrade
    

    Aborted with error. node_modules/ saved elsewhere. Then a

    npm install
    

    Then checked the version

    npm list sharp
    

    Was the right version.

    ~/nodebb_test$ npm list sharp
    nodebb@1.18.5 /home/user/nodebb_test
    └── sharp@0.29.2

    After that

    ./nodebb upgrade
    

    Ran through flawlessly. Then rebuild & restart.

    Oddly enough, I always have to run ./nodebb upgrade twice with this version until the forum works properly. But this should not be the problem here.

    Now I'm on version 1.18.5 - a stony way.

    Translated with www.DeepL.com/Translator (free version)

    @pitaj Thank you!

  • Topic has been marked as solved  FrankM FrankM 

Suggested Topics

| |