upgrade pain from v1.12 to v1.13.x/v1.14.x

Technical Support
  • it was no problem to uprade from v1.7.x to v1.12. since v1.12.x sharp was added. i was searching the solution for last 2 hours but nothing works.
    i run ubuntu lts 16.04. i already have make, g++, python and libvips-dev
    node version is v8.6.0

    ervice@wiki:/user/mun/isweb/nodebb$ git checkout v1.13.x
    Branch v1.13.x konfiguriert zum Folgen von Remote-Branch v1.13.x von origin.
    Zu neuem Branch 'v1.13.x' gewechselt
    service@wiki:/user/mun/isweb/nodebb$ git reset --hard origin/v1.13.x
    HEAD ist jetzt bei f879c4a chore: incrementing version number - v1.13.4-5
    service@wiki:/user/mun/isweb/nodebb$ ./nodebb upgrade
    Dependencies outdated or not yet installed.
    Installing them now...
    
    npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
    npm WARN notice [SECURITY] sanitize-html has the following vulnerability: 1 critical. Go here for more details: https://www.npmjs.com/advisories?search=sanitize-html&version=1.27.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
    npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
    npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
    npm WARN deprecated [email protected]: this library is no longer supported
    WARN notice [SECURITY] minimist has the following vulnerability: 1 low. Go here for more details: https://www.npmjs.com/advisories?search=minimist&version=0.0.8 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
    
    > [email protected] install /user/mun/isweb/nodebb/node_modules/benchpressjs
    > cd rust/benchpress-rs && npm install
    
    
    > [email protected] install /user/mun/isweb/nodebb/node_modules/benchpressjs/rust/benchpress-rs
    > neon build --release >> build.log 2>&1 || exit 0
    
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 83 packages in 3.364s
    
    > [email protected] install /user/mun/isweb/nodebb/node_modules/sharp
    > (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
    
    info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-linux-x64.tar.gz
    prebuild-install WARN This package does not support N-API version undefined
    prebuild-install WARN install No prebuilt binaries found (target=undefined runtime=napi arch=x64 libc= platform=linux)
    make: Verzeichnis „/user/mun/isweb/nodebb/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/src/common.o
    In file included from ../src/common.cc:22:0:
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi.h:1939:33: error: ‘napi_callback_scope’ has not been declared
         CallbackScope(napi_env env, napi_callback_scope scope);
                                     ^
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi.h:1946:14: error: expected type-specifier before ‘napi_callback_scope’
         operator napi_callback_scope() const;
                  ^
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi.h:1952:5: error: ‘napi_callback_scope’ does not name a type
         napi_callback_scope _scope;
         ^
    In file included from /user/mun/isweb/nodebb/node_modules/node-addon-api/napi.h:2426:0,
                     from ../src/common.cc:22:
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h:4009:17: error: ‘napi_callback_scope’ has not been declared
       napi_env env, napi_callback_scope scope) : _env(env), _scope(scope) {
                     ^
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h: In constructor ‘Napi::CallbackScope::CallbackScope(napi_env, int)’:
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h:4009:57: error: class ‘Napi::CallbackScope’ does not have any field named ‘_scope’
       napi_env env, napi_callback_scope scope) : _env(env), _scope(scope) {
                                                             ^
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h: In constructor ‘Napi::CallbackScope::CallbackScope(napi_env, napi_async_context)’:
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h:4015:41: error: ‘_scope’ was not declared in this scope
           _env, Object::New(env), context, &_scope);
                                             ^
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h:4015:47: error: ‘napi_open_callback_scope’ was not declared in this scope
           _env, Object::New(env), context, &_scope);
                                                   ^
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h: In destructor ‘virtual Napi::CallbackScope::~CallbackScope()’:
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h:4020:56: error: ‘_scope’ was not declared in this scope
       napi_status status = napi_close_callback_scope(_env, _scope);
                                                            ^
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h:4020:62: error: ‘napi_close_callback_scope’ was not declared in this scope
       napi_status status = napi_close_callback_scope(_env, _scope);
                                                                  ^
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h: At global scope:
    /user/mun/isweb/nodebb/node_modules/node-addon-api/napi-inl.h:4026:32: error: expected type-specifier before ‘napi_callback_scope’
     inline CallbackScope::operator napi_callback_scope() const {
                                    ^
    cc1plus: warning: unrecognized command line option ‘-Wno-cast-function-type’
    sharp.target.mk:123: die Regel für Ziel „Release/obj.target/sharp/src/common.o“ scheiterte
    make: *** [Release/obj.target/sharp/src/common.o] Fehler 1
    make: Verzeichnis „/user/mun/isweb/nodebb/node_modules/sharp/build“ wird verlassen
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
    gyp ERR! stack     at emitTwo (events.js:125:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    gyp ERR! System Linux 4.4.0-43-generic
    gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /user/mun/isweb/nodebb/node_modules/sharp
    gyp ERR! node -v v8.6.0
    gyp ERR! node-gyp -v v3.6.2
    gyp ERR! not ok
    npm WARN [email protected] requires a peer of nodebb-plugin-emoji@^2.0.0 but none was installed.
    npm WARN [email protected] requires a peer of nodebb-plugin-emoji@^2.0.0 but none was installed.
    npm WARN [email protected] requires a peer of textcomplete@^0.14.2 but none was installed.
    npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none was installed.
    npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none was installed.
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/service/.npm/_logs/2020-08-19T10_51_50_336Z-debug.log
    Error installing dependencies!
    message: Command failed: npm install --production
    stdout: null
    stderr: null
    /user/mun/isweb/nodebb/src/cli/package-install.js:72
                    throw e;
                    ^
    
    Error: Command failed: npm install --production
        at checkExecSyncError (child_process.js:592:13)
        at Object.execSync (child_process.js:632:13)
        at Object.installAll (/user/mun/isweb/nodebb/src/cli/package-install.js:63:9)
        at Object.<anonymous> (/user/mun/isweb/nodebb/src/cli/index.js:60:18)
        at Module._compile (module.js:624:30)
        at Object.Module._extensions..js (module.js:635:10)
        at Module.load (module.js:545:32)
        at tryModuleLoad (module.js:508:12)
        at Function.Module._load (module.js:500:3)
        at Module.require (module.js:568:17)
    

    please help!

  • Sharp probably requires a newer Node.js version. I know Benchpress and/or Emoji definitely do anyway.

    I would recommend installing a new version via the steps outlined here: https://github.com/nodesource/distributions/blob/master/README.md#deb

    NodeBB is tested on Node.js 10+, but we recommend Node.js 12.


Suggested Topics