Upgrade error 1.17.1 to 1.18.x
Solved
Technical Support
-
Hello,
Here is what i do for upgrade :
cd /home/XXX/nodebb ./nodebb stop git fetch git checkout v1.18.x ./nodebb upgrade
And the error :
./nodebb upgrade Updating NodeBB... 1. Updating package.json file with defaults... OK 2. Bringing base dependencies up to date... started npm ERR! code CERT_NOT_YET_VALID npm ERR! errno CERT_NOT_YET_VALID npm ERR! request to https://registry.npmjs.org/connect-mongo failed, reason: certificate is not yet valid npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-07-06T19_30_49_355Z-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:643:11) at Object.execSync (child_process.js:679:15) at Object.installAll (/home/nodebb/nodebb/src/cli/package-install.js:73:9) at Object.handler (/home/nodebb/nodebb/src/cli/upgrade.js:21:19) at runSteps (/home/nodebb/nodebb/src/cli/upgrade.js:54:16) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Object.runUpgrade [as upgrade] (/home/nodebb/nodebb/src/cli/upgrade.js:84:3) (node:3789) UnhandledPromiseRejectionWarning: Error: Command failed: npm install --production at checkExecSyncError (child_process.js:643:11) at Object.execSync (child_process.js:679:15) at Object.installAll (/home/nodebb/nodebb/src/cli/package-install.js:73:9) at Object.handler (/home/nodebb/nodebb/src/cli/upgrade.js:21:19) at runSteps (/home/nodebb/nodebb/src/cli/upgrade.js:54:16) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Object.runUpgrade [as upgrade] (/home/nodebb/nodebb/src/cli/upgrade.js:84:3) (Use `node --trace-warnings ...` to show where the warning was created) (node:3789) 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:3789) [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.
My info:
./nodebb info 2021-07-06T19:29:13.839Z [4567/3741] - verbose: [minifier] utilizing a maximum of 0 additional threads version: 1.17.1 Node ver: v14.17.2 git hash: 902da5402918dbe99c5f298ce769b0b1994739b5 database: mongo version: 4.4.6 engine: wiredTiger
Thanks in advance
-
Can you try running
npm install --production
? -
npm install --production npm ERR! code CERT_NOT_YET_VALID npm ERR! errno CERT_NOT_YET_VALID npm ERR! request to https://registry.npmjs.org/connect-mongo failed, reason: certificate is not yet valid npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-07-06T19_28_45_350Z-debug.log
-
I just tested the installation of NodeBB 1.18.x on a brand new installation of Debian 11.
After install nodejs14 and mongodb 5
sudo apt install -y git
cd /home/XXXX sudo git clone -b v1.18.x https://github.com/NodeBB/NodeBB.git nodebb cd nodebb sudo ./nodebb setup
Error :
package.json not found. Populating package.json... OK 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 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]: support for ECMAScript is superseded by `uglify-js` as of v3.13.0 npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. > [email protected] install /home/nodebb/nodebb/node_modules/sharp > (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) sharp: Installation error: EACCES: permission denied, mkdir '/root/.npm' sharp: Are you trying to install as a root or sudo user? Try again with the --unsafe-perm flag sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN [email protected] requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself. npm WARN @apidevtools/[email protected] requires a peer of openapi-types@>=7 but none is installed. You must install peer dependencies yourself. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && 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! /root/.npm/_logs/2021-10-26T21_08_06_187Z-debug.log Error installing dependencies! message: Command failed: npm install --production stdout: null stderr: null /home/nodebb/nodebb/src/cli/package-install.js:82 throw e; ^ 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/nodebb/nodebb/src/cli/package-install.js:73:9) at Object.<anonymous> (/home/nodebb/nodebb/src/cli/index.js:62:18) 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) at require (internal/modules/cjs/helpers.js:93:18) { status: 1, signal: null, output: [ null, null, null ], pid: 4672, stdout: null, stderr: null }
-
Why are you running under
sudo
? We strongly recommend installing and running as an unprivileged user. -
@downpw running under sudo caused that npm error on Debian 11. Try installing fresh without it.
I'm not sure why your npm install is erroring with an ssl certificate issue. Maybe try clearing your npm cache or searching that error code. It's not a problem with NodeBB.
-
@downpw we currently don't support anything newer than v14, but that's being worked on.
-
Copyright © 2024 NodeBB | Contributors