Upgrading from 1.19.5

Unsolved Technical Support
  • I'll admit, I've been a bit lazy when it comes to upgrading.

    I've noticed you are now on 2.6.1, is there a specific method of upgrading to this version?

    I did try doing it directly (luckily I had setup a test environment with the db copied) but everything seems to be broken and js files are showing as not found in development console and admin panel doesn't work at all.

    I thought it was plugins and themes, so disabled all the plugins and reset the theme back to persona, rebuilt the assets etc but I still get the same issue.

    I just wonder if I'm doing anything wrong.

  • @Biff have you encountered any errors during the upgrade process? You did run ./nodebb upgrade right?

  • @PitaJ I've redone the upgrade from scratch again and noticed the following error.

    Upgrading packages...
    
    4. Updating NodeBB data store schema...2022-12-07T13:47:09.272Z [5577/12580] - verbose: [minifier] utilizing a maximum of 3 additional threads
    Error occurred during upgrade: TypeError: maxAge must be a number
        at LRUCache.set (/var/server_dev/node_modules/lru-cache/index.js:157:13)
        at Object.cache.set (/var/server_dev/src/cache/lru.js:68:12)
        at /var/server_dev/src/database/mongo/hash.js:138:10
        at Array.forEach (<anonymous>)
        at module.getObjectsFields (/var/server_dev/src/database/mongo/hash.js:136:16)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
        at async module.getObjects (/var/server_dev/src/database/mongo/hash.js:92:10)
        at async module.getObject (/var/server_dev/src/database/mongo/hash.js:87:16)
        at async Configs.getFields (/var/server_dev/src/meta/configs.js:111:12)
        at async Configs.list (/var/server_dev/src/meta/configs.js:98:9)
    (node:12580) UnhandledPromiseRejectionWarning: TypeError: maxAge must be a number
        at LRUCache.set (/var/server_dev/node_modules/lru-cache/index.js:157:13)
        at Object.cache.set (/var/server_dev/src/cache/lru.js:68:12)
        at /var/server_dev/src/database/mongo/hash.js:138:10
        at Array.forEach (<anonymous>)
        at module.getObjectsFields (/var/server_dev/src/database/mongo/hash.js:136:16)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
        at async module.getObjects (/var/server_dev/src/database/mongo/hash.js:92:10)
        at async module.getObject (/var/server_dev/src/database/mongo/hash.js:87:16)
        at async Configs.getFields (/var/server_dev/src/meta/configs.js:111:12)
        at async Configs.list (/var/server_dev/src/meta/configs.js:98:9)
    (Use `node --trace-warnings ...` to show where the warning was created)
    (node:12580) 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:12580) [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.
    
  • @Biff I think this is a known issue. You need to run ./nodebb upgrade twice in a row. It should succeed the second time.

  • Yep, works the second time but still can't seem to get the site to work correctly or login.

    Getting the following in console errors:

    image.png

    The script in question returning 404 is:

    assets/src/modules/bootbox.js?v=f7cvgereu9u

  • @Biff what is the output of ./nodebb build?

  • @PitaJ

    2022-12-08T19:40:23.617Z [5577/15715] - verbose: [minifier] utilizing a maximum of 3 additional threads
    2022-12-08T19:40:24.064Z [5577/15715] - verbose: [build] Querying CPU core count for build strategy
    2022-12-08T19:40:24.064Z [5577/15715] - verbose: [build] System returned 4 cores, opting for parallel build strategy
    2022-12-08T19:40:24.065Z [5577/15715] - verbose: [build] building the following targets: plugin static dirs, requirejs modules, client js bundle, admin js bundle, client side styles, admin control panel styles, templates, languages
      started
    2022-12-08T19:40:24.422Z [5577/15715] - verbose: [plugins] loading the following fields from plugin data: staticDirs, modules, clientScripts, acpScripts, cssFiles, lessFiles, acpLessFiles, languageData
    2022-12-08T19:40:24.428Z [5577/15715] - verbose: [plugins] Found 3 AMD-style module(s) for plugin nodebb-theme-persona
    2022-12-08T19:40:24.429Z [5577/15715] - verbose: [plugins] Found 2 js file(s) for plugin nodebb-theme-persona
    2022-12-08T19:40:24.431Z [5577/15715] - info: [build] Building in parallel mode
    2022-12-08T19:40:24.432Z [5577/15715] - info: [build]         plugin static dirs  build started
    2022-12-08T19:40:24.435Z [5577/15715] - info: [build]          requirejs modules  build started
    2022-12-08T19:40:24.435Z [5577/15715] - info: [build]           client js bundle  build started
    2022-12-08T19:40:24.436Z [5577/15715] - info: [build]            admin js bundle  build started
    2022-12-08T19:40:24.436Z [5577/15715] - info: [build]         client side styles  build started
    2022-12-08T19:40:24.436Z [5577/15715] - info: [build] admin control panel styles  build started
    2022-12-08T19:40:24.437Z [5577/15715] - info: [build]                  templates  build started
    2022-12-08T19:40:24.437Z [5577/15715] - info: [build]                  languages  build started
    2022-12-08T19:40:24.468Z [5577/15715] - info: [build]         plugin static dirs  build completed in 0.036sec
    2022-12-08T19:40:25.494Z [5577/15715] - info: [build]           client js bundle  build completed in 1.059sec
    2022-12-08T19:40:25.494Z [5577/15715] - info: [build]            admin js bundle  build completed in 1.058sec
    2022-12-08T19:40:28.887Z [5577/15715] - info: [build]         client side styles  build completed in 4.451sec
    2022-12-08T19:40:30.557Z [5577/15715] - info: [build] admin control panel styles  build completed in 6.121sec
    2022-12-08T19:40:30.793Z [5577/15715] - info: [build]                  languages  build completed in 6.356sec
    2022-12-08T19:40:31.097Z [5577/15715] - verbose: [meta/templates] Successfully compiled templates.
    2022-12-08T19:40:31.097Z [5577/15715] - info: [build]                  templates  build completed in 6.66sec
    2022-12-08T19:40:31.197Z [5577/15715] - info: [build]          requirejs modules  build completed in 6.762sec
    2022-12-08T19:40:31.198Z [5577/15715] - info: [build] Bundling with Webpack.
    281 assets
    770 modules
    
    ERROR in ./build/public/src/client/chats.js
    Module not found: Error: Can't resolve 'composer/autocomplete' in '/var/server_dev/build/public/src/client'
    
    ERROR in ./build/public/src/modules/persona/quickreply.js
    Module not found: Error: Can't resolve 'composer' in '/var/server_dev/build/public/src/modules/persona'
    
    ERROR in ./build/public/src/modules/persona/quickreply.js
    Module not found: Error: Can't resolve 'composer/autocomplete' in '/var/server_dev/build/public/src/modules/persona'
    
    ERROR in ./build/public/src/modules/topicThumbs.js 65:10-68:12
    Module not found: Error: Can't resolve 'composer' in '/var/server_dev/build/public/src/modules'
    
    webpack 5.75.0 compiled with 4 errors in 5868 ms
    2022-12-08T19:40:37.685Z [5577/15715] - info: [build] Asset compilation successful. Completed in 13.253sec.
    
    
  • What is the output of ./nodebb plugins? Seems like composer modules aren't found during build.

  • Ah yes, it seems I overlooked that when I deactivated all the plugins and only reactivated the persona theme.

    Seems to be working to a fashion, just need to get some plugins I rely on updated.


Suggested Topics


  • 1 Votes
    3 Posts
    397 Views
  • 1 Votes
    9 Posts
    826 Views
  • 1 Votes
    4 Posts
    406 Views
  • Cant upgrade.

    Technical Support
    0 Votes
    4 Posts
    780 Views
  • 0 Votes
    6 Posts
    1154 Views