Greetings!

We're currently running NodeBB v3.10.3 and I have been trying to upgrade to latest (v4.6.1 at the time of writing). I have not tried upgrading directly on the instance yet since I wanted to try locally first with the same or close-to-same conditions (node versions npm versions Ubuntu versions, latest DB backup, public files etc).

However, the upgrade script has been failing again and again and I even upgraded node to v22.21.0 and npm to v10.9.4.

The error always seem to be something along the lines of "Dependencies outdated or not yet installed. Error Code: DEP_WRONG_VERSION".

Then I followed the following instructions and have been able to "seemingly" upgrade NodeBB. However, I am not entirely sure if the process I followed is correct or if I have missed any steps that would run all the upgrade scripts like db migration/plugin upgrades etc.

Steps I followed are a follows:

Any feedback would be appreciated. Thank you!

465ef2a7-0985-480d-9c22-db2bbe23d60b-image.png

all 2 comments

sorted by: hot top controversial new old
[–] [S] 4 points 6 months ago

An update on this in case it helps anyone else: So there were some custom plugins that were installed via a local directory. The upgrade goes through without issues by performing the following before the upgrade:

  1. custom plugins are omitted from package.json
  2. node_modules and package-lock.json are removed

Once upgraded,

  1. the custom plugin dependencies are to be added to package.json
  2. Run npm install followed by ./nodebb build

This should fix the dependency issue if you have any custom plugins

  • source
  • [–] 2 points 8 months ago

    You can run ./nodebb upgrade after npm install and it will run any migration scripts if they weren't run before.

    ./nodebb upgrade is a combination of updating package.json, running npm install and running upgrade scripts.

  • source