upgrading from 0.7.3 - advice

Technical Support
  • Hi everyone,

    I am running a community forum (10k users, 15k topics) on a very old version of nodebb:
    You are running NodeBB v0.7.3. A new version (v1.15.0-beta.29) has been released. Consider upgrading your NodeBB.

    I am looking for advice, before trying to upgrade nodebb. What is the right method. Any information will be useful before I begin this (painful) process.

    Here's the list of plugins currently installed:

    nodebb-plugin-anti-spam-question
    simple question to prevent spam bots from registering
    
    Installed 0.1.0 | Latest 0.1.0
    For more information: https://github.com/Fusselwurm/nodebb-plugin-anti-spam-question#readme
    
     
    nodebb-plugin-code-button
    Simply adds a code button to composer.
    
    Installed 0.0.1 | Latest 0.0.1
    For more information: https://github.com/henrikekblad/nodebb-plugin-code-button#readme
    
     
    nodebb-plugin-composer-default
    Default composer for NodeBB
    
     Installed 1.0.9 | Latest 1.0.26 
    For more information: https://github.com/NodeBB/nodebb-plugin-composer-default#readme
    
     
    nodebb-plugin-custom-pages
    Allows you to add as many new pages as you like to your NodeBB forum
    
    Installed 0.2.2 | Latest 0.2.2
    For more information: https://github.com/psychobunny/nodebb-plugin-custom-pages#readme
    
     
    nodebb-plugin-dbsearch
    A Plugin that let's users search posts and topics
    
     Installed 0.2.15 | Latest 0.2.18 
    For more information: https://github.com/barisusakli/nodebb-plugin-dbsearch
    
     
    nodebb-plugin-emailer-mailgun
    An emailer plugin for NodeBB using Mailgun as a third party service
    
    Installed 0.4.3 | Latest 0.4.3
    For more information: https://github.com/julianlam/nodebb-plugin-emailer-mailgun
    
     
    nodebb-plugin-emailer-mandrill
    An emailer plugin for NodeBB using Mandrill as a third party service
    
     Installed 0.2.3 | Latest 0.2.4 
    For more information: https://github.com/akhoury/nodebb-plugin-emailer-mandrill
    
     
    nodebb-plugin-embed-videos
    With this plugin, video, audio, images from Youtube, Vimeo, Facebook, Vine, Dailymotion, Mixcloud, spotify, pinterest embeded.
    
     Installed 0.0.7 | Latest 0.1.9 
    For more information: https://github.com/ogerly/nodebb-plugin-embed-videos
    
     
    nodebb-plugin-emoji-extended
    Emoji for NodeBB with emoticon-mapping and text-completion :) Known Conflicts: nodebb-plugin-emoji
    
     Installed 0.4.9 | Latest 0.4.17 
    For more information: https://github.com/NodeBB-Community/nodebb-plugin-emoji-extended#readme
    
     
    nodebb-plugin-google-analytics
    Google Analytics for NodeBB
    
     Installed 0.5.5 | Latest 0.5.8 
    For more information: https://github.com/julianlam/nodebb-plugin-google-analytics#readme
    
     
    nodebb-plugin-markdown
    A Markdown parser for NodeBB
    
     Installed 4.0.2 | Latest 4.0.14 
    For more information: https://github.com/julianlam/nodebb-plugin-markdown
    
     
    nodebb-plugin-mentions
    NodeBB Plugin that allows users to mention other users by prepending an '@' sign to their username
    
     Installed 1.0.0 | Latest 1.0.25 
    For more information: https://github.com/julianlam/nodebb-plugin-mentions
    
     
    nodebb-plugin-soundcloud
    NodeBB SoundCloud Plugin
    
     Installed 0.3.0 | Latest 0.3.1 
    For more information: https://github.com/tedr56/nodebb-plugin-soundcloud
    
     
    nodebb-plugin-soundpack-default
    Default Sound Pack
    
     Installed 0.1.2 | Latest 0.1.6 
    For more information: https://github.com/julianlam/nodebb-plugin-soundpack-default
    
     
    nodebb-plugin-spam-be-gone
    anti spam using both Akismet.com and StopForumSpam.com
    
     Installed 0.4.1 | Latest 0.4.5 
    For more information: https://github.com/akhoury/nodebb-plugin-spam-be-gone
    
     
    nodebb-plugin-vimeo
    NodeBB Vimeo Plugin
    
    Installed 0.2.1 | Latest 0.2.1
    For more information: https://github.com/tedr56/nodebb-plugin-vimeo
    
     
    nodebb-rewards-essentials
    Essential Rewards Starter Pack for NodeBB
    
    Installed 0.0.3 | Latest 0.0.3
    For more information: https://github.com/NodeBB/nodebb-rewards-essentials
    
     
    nodebb-theme-lavender
    Lavender Theme for NodeBB
    
    Installed 1.0.49 | Latest 1.0.49
     
    nodebb-theme-persona
    Persona theme for NodeBB
    
     Installed 2.0.13 | Latest 2.0.28 
     
    nodebb-theme-vanilla
    Vanilla theme for NodeBB
    
     Installed 3.0.7 | Latest 3.0.17 
     
    nodebb-widget-essentials
    NodeBB Essential Widgets
    
     Installed 1.0.4 | Latest 2.0.7 
    For more information: https://github.com/psychobunny/nodebb-widget-essentials#readme
    
  • Which plugins are active? You have multiple themes in there, which are you using?

  • @PitaJ All listed plugins but mandrill & google analytics.Theme used is lavender.

  • Plugins

    nodebb-plugin-anti-spam-question

    Not sure about this one

    nodebb-plugin-code-button

    This is now built in

    nodebb-plugin-composer-default, nodebb-plugin-dbsearch, nodebb-plugin-markdown, nodebb-plugin-mentions, nodebb-rewards-essentials, nodebb-widget-essentials, nodebb-theme-lavender, nodebb-plugin-soundpack-default

    All of these are packaged and distributed with NodeBB

    nodebb-plugin-custom-pages

    Actively maintained

    nodebb-plugin-emailer-mailgun

    Still maintained, should be fine

    nodebb-plugin-emoji-extended

    Replaced by nodebb-plugin-emoji

    nodebb-plugin-spam-be-gone

    Actively maintained

    nodebb-plugin-embed-videos, nodebb-plugin-vimeo, nodebb-plugin-soundcloud

    Not sure about these embed plugins

    Upgrade procedure

    You'll have to perform a mix of old-style and new-style upgrading to get to the latest version. This will be a little complicated.

    1. Backup your database and uploads
    2. Install Node 10 locally, it should be compatible with everything
    3. Make a local copy of your database and NodeBB for experimenting
    4. Edit the local config.json to point to the database copy

    All further operations should be performed on the experimental copy

    1. Pre-check
      a. Start your local copy of NodeBB
      b. Make sure it is working like the old one
    2. Disable all plugins, then Stop NodeBB
    3. Prepare for Old-Style Upgrade
      a. Check the output of git status. It should say "nothing to commit, working tree clean"
      b. If there are any changes, run the following to reset to upstream: git checkout HEAD -- .
      c. If there are any untracked files, delete them
      d. git pull to get the latest on the v0.7.x branch
    4. Execute Old-Style upgrade to v1
      a. git checkout v0.8.x
      b. ./nodebb upgrade
      c. git checkout v0.9.x
      d. ./nodebb upgrade
      e. git checkout v1.x.x
      f. ./nodebb upgrade
    5. Execute New-Style upgrade to latest
      a. git checkout v1.14.x
      b. ./nodebb upgrade

    Now it should be upgraded. Start NodeBB and check that it's running correctly. Let me know if you run into any issues during the process.

  • @PitaJ Thank you so much, I could not ask for a better reply. I owe you one 🍺
    I will find time and courage and tackle this soon.
    Again thank you (I will report back if it was a success or a disaster)

  • @pitaj I was able to upgrade to v0.8.x, but trying to go to v0.9.x

    npm ERR! code ETARGET
    npm ERR! notarget No matching version found for [email protected].
    npm ERR! notarget In most cases you or one of your dependencies are requesting
    npm ERR! notarget a package version that doesn't exist.
    

    Any idea, the package lwip is causing me a lot of trouble too (had to run --unsafe-perm to be able to build it, but not sure if it's related).

  • @patrick-sébastien-coulombe We no longer use lwip, so you might be able to just remove it from package.json and continue with the upgrade.

  • @baris Thank you, I was able to upgrade to v0.9.x (getting there). I am facing this error when trying to use any version of node > 4 (I know).

    child_process.js:435
        throw new ERR_INVALID_ARG_TYPE('options.cwd', 'string', options.cwd);
        ^
    
    TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string. Received type function
        at normalizeSpawnArguments (child_process.js:435:11)
        at Object.spawn (child_process.js:545:16)
        at Function.module.exports.daemon (/home/psc/Downloads/nodebb/node_modules/daemon/index.js:50:31)
        at module.exports (/home/psc/Downloads/nodebb/node_modules/daemon/index.js:25:20)
        at /home/psc/Downloads/nodebb/loader.js:256:21
        at FSReqWrap.args [as oncomplete] (fs.js:140:20)
    

    I read that it's because of running a daemon or something like that. Someone suggested to edit loader.js and did just that: https://github.com/NodeBB/NodeBB/commit/568b2b995735fdb4381509bb4b20b0795561fcd0

    But now the error is:

    fs.js:128
      throw new ERR_INVALID_CALLBACK();
      ^
    
    TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
        at maybeCallback (fs.js:128:9)
        at Object.writeFile (fs.js:1163:14)
        at /home/psc/Downloads/nodebb/loader.js:262:7
        at FSReqWrap.args [as oncomplete] (fs.js:140:20)
    

    I think I am stuck.

  • @patrick-sébastien-coulombe You said you have successfully upgraded to v0.9.x, so what are you trying now, just to run NodeBB to test?

    You could probably just continue the upgrade at this point...

  • Hi @julian,

    Good idea, from v0.9.x to v1.x.x I get this error when running the upgrade:

    3. Updating NodeBB data store schema...
    14/10 11:31:05 [101278] - warn: [cache-buster] could not read cache buster: ENOENT: no such file or directory, open '/home/psc/Downloads/nodebb/build/cache-buster'
    14/10 11:31:05 [101278] - info: Beginning database schema update
    14/10 11:31:05 [101278] - error: [upgrade] NodeBB upgrade could not complete, as your database schema is too far out of date.
    14/10 11:31:05 [101278] - error: [upgrade]   Please ensure that you did not skip any minor version upgrades.
    14/10 11:31:05 [101278] - error: [upgrade]   (e.g. v0.1.x directly to v0.3.x)
    14/10 11:31:05 [101278] - error: Error: upgrade-not-possible
        at Command.callback (/home/psc/Downloads/nodebb/src/upgrade.js:67:11)
        at normal_reply (/home/psc/Downloads/nodebb/node_modules/redis/index.js:721:21)
        at RedisClient.return_reply (/home/psc/Downloads/nodebb/node_modules/redis/index.js:819:9)
        at JavascriptRedisParser.returnReply (/home/psc/Downloads/nodebb/node_modules/redis/index.js:192:18)
        at JavascriptRedisParser.execute (/home/psc/Downloads/nodebb/node_modules/redis-parser/lib/parser.js:574:12)
        at Socket.<anonymous> (/home/psc/Downloads/nodebb/node_modules/redis/index.js:274:27)
        at Socket.emit (events.js:198:13)
        at addChunk (_stream_readable.js:288:12)
        at readableAddChunk (_stream_readable.js:269:11)
        at Socket.Readable.push (_stream_readable.js:224:10)
    
    Error: undefined
    
  • @patrick-sébastien-coulombe and ./nodebb upgrade finished successfully on v0.9.x?

    Edit: share the output of git status too

  • @pitaj Yes v0.9.x = Success when runninng the upgrade command (but was not able to launch nodebb as stated). So switched to v1.x.x:

    git status
    On branch v1.x.x
    Your branch is up to date with 'origin/v1.x.x'.
    
    Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git restore <file>..." to discard changes in working directory)
    	modified:   package.json
    
    Untracked files:
      (use "git add <file>..." to include in what will be committed)
    	package-lock.json
    
    no changes added to commit (use "git add" and/or "git commit -a")
    
    [email protected]:/home/psc/Downloads/nodebb# git diff
    diff --git a/package.json b/package.json
    index c786e5ac1..6f8ae9706 100644
    --- a/package.json
    +++ b/package.json
    @@ -136,4 +136,4 @@
           "url": "https://github.com/barisusakli"
         }
       ]
    -}
    \ No newline at end of file
    +}
    
  • @patrick-sébastien-coulombe hmm. Looks like v1.x.x is actually at 1.4.6.

    Try this:

    • git checkout v1.0.3
    • ./nodebb upgrade

    Then continue from step 9.

  • @pitaj Almost there! Branch is v1.14.x, when running ./nodebb upgrade I get rdb.connect is not a function.

    Proceed with upgrade (y|n)? y
    
    Upgrading packages...
    
    4. Updating NodeBB data store schema...2020-10-14T19:45:35.842Z [4567/270246] - warn: [cache-buster] could not read cache buster ENOENT: no such file or directory, open '/home/psc/Downloads/nodebb/build/cache-buster' {"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/psc/Downloads/nodebb/build/cache-buster","stack":"Error: ENOENT: no such file or directory, open '/home/psc/Downloads/nodebb/build/cache-buster'"}
    
    Parsing upgrade scripts... 
    2020-10-14T19:45:35.864Z [4567/270246] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-youtube-lite`. Skipping.
    2020-10-14T19:45:35.864Z [4567/270246] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-anti-spam-question`. Skipping.
    2020-10-14T19:45:35.864Z [4567/270246] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-embed-videos`. Skipping.
    2020-10-14T19:45:35.864Z [4567/270246] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-code-button`. Skipping.
    2020-10-14T19:45:35.864Z [4567/270246] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-soundcloud`. Skipping.
    2020-10-14T19:45:35.864Z [4567/270246] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-custom-pages`. Skipping.
    2020-10-14T19:45:35.864Z [4567/270246] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-vimeo`. Skipping.
    2020-10-14T19:45:35.865Z [4567/270246] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-emailer-mailgun`. Skipping.
    OK | 89 script(s) found
      → [2015/12/15] Upgrading chats... skipped
      → [2015/12/23] Chat room hashes... skipped
      → [2015/12/23] Adding theme to active plugins sorted set... skipped
      → [2016/1/14] Creating user best post sorted sets... skipped
      → [2016/1/20] Creating users:notvalidated... skipped
      → [2016/1/23] Creating Global moderators group... skipped
      → [2016/2/25] Social: Post Sharing... skipped
      → [2016/4/14] Group title from settings to user profile... OK
      → [2016/4/19] Users post count per tid... OK
      → [2016/4/29] Dismiss flags from deleted topics... OK
      → [2016/5/28] Giving topics:read privs to any group that was previously allowed to Find & Access Category... OK
        [#############] (60900/60914) 99%  OKeparately...
      → [2016/7/12] Giving upload privileges... OK
      → [2016/8/5] Removing best posts with negative scores... OK
      → [2016/8/7] Granting edit/delete/delete topic on existing categories... OK
      → [2016/9/22] Category recent tids... OK
        [#############] (60900/60914) 99%  OK.
        [              ] (600/60914) 0%  OKeplies...
      → [2016/11/22] Update global and user language keys... OK
      → [2016/11/25] Sorted set for pinned topics... OK
      → [2017/2/25] Update global and user sound settings... OK
      → [2017/2/28] Upgrading config urls to use assets route... OK
      → [2017/4/16] Delete accidentally long-lived sessions...Error occurred
    Error occurred during upgrade: TypeError: rdb.connect is not a function
        at /home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:26:23
        at nextTask (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4576:27)
        at Object.waterfall (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4587:9)
        at Object.awaitable [as waterfall] (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:208:32)
        at Object.method (/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:22:9)
        at internal/util.js:297:30
        at new Promise (<anonymous>)
        at Object.method (internal/util.js:296:12)
        at /home/psc/Downloads/nodebb/src/upgrade.js:174:8
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:148:38
    2020-10-14T19:45:43.468Z [4567/270246] - error: uncaughtException: rdb.connect is not a function
    TypeError: rdb.connect is not a function
        at /home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:26:23
        at nextTask (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4576:27)
        at Object.waterfall (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4587:9)
        at Object.awaitable [as waterfall] (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:208:32)
        at Object.method (/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:22:9)
        at internal/util.js:297:30
        at new Promise (<anonymous>)
        at Object.method (internal/util.js:296:12)
        at /home/psc/Downloads/nodebb/src/upgrade.js:174:8
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:148:38 {"error":{},"stack":"TypeError: rdb.connect is not a function\n    at /home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:26:23\n    at nextTask (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4576:27)\n    at Object.waterfall (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4587:9)\n    at Object.awaitable [as waterfall] (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:208:32)\n    at Object.method (/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:22:9)\n    at internal/util.js:297:30\n    at new Promise (<anonymous>)\n    at Object.method (internal/util.js:296:12)\n    at /home/psc/Downloads/nodebb/src/upgrade.js:174:8\n    at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:148:38","exception":true,"date":"Wed Oct 14 2020 15:45:43 GMT-0400 (Eastern Daylight Time)","process":{"pid":270246,"uid":0,"gid":0,"cwd":"/home/psc/Downloads/nodebb","execPath":"/usr/local/bin/node","version":"v12.19.0","argv":["/usr/local/bin/node","/home/psc/Downloads/nodebb/nodebb","upgrade"],"memoryUsage":{"rss":256401408,"heapTotal":196571136,"heapUsed":152463416,"external":1687836,"arrayBuffers":190667}},"os":{"loadavg":[1.64,1.01,0.91],"uptime":26813},"trace":[{"column":23,"file":"/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js","function":null,"line":26,"method":null,"native":false},{"column":27,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":"nextTask","line":4576,"method":null,"native":false},{"column":9,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":"Object.waterfall","line":4587,"method":"waterfall","native":false},{"column":32,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":"Object.awaitable [as waterfall]","line":208,"method":"awaitable [as waterfall]","native":false},{"column":9,"file":"/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js","function":"Object.method","line":22,"method":"method","native":false},{"column":30,"file":"internal/util.js","function":null,"line":297,"method":null,"native":false},{"column":null,"file":null,"function":"new Promise","line":null,"method":null,"native":false},{"column":12,"file":"internal/util.js","function":"Object.method","line":296,"method":"method","native":false},{"column":8,"file":"/home/psc/Downloads/nodebb/src/upgrade.js","function":null,"line":174,"method":null,"native":false},{"column":38,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":null,"line":148,"method":null,"native":false}]}
    
  • @patrick-sébastien-coulombe did the npm install portion of the upgrade complete successfully? Can you provide the full output of the upgrade?

  • npm install --unsafe-perm (I had to run it manually with --unsafe-perm)

    npm WARN [email protected] requires a peer of eslint@^5.16.0 || ^6.8.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of nodebb-plugin-emoji@^2.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of nodebb-plugin-emoji@^2.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    
    audited 1361 packages in 3.717s
    
    77 packages are looking for funding
      run `npm fund` for details
    
    found 4 vulnerabilities (3 low, 1 high)
      run `npm audit fix` to fix them, or `npm audit` for details
    

    ./nodebb upgrade

    Updating NodeBB...
    
    1. Updating package.json file with defaults...  OK
    
    2. Bringing base dependencies up to date...  started
    npm WARN [email protected] requires a peer of eslint@^5.16.0 || ^6.8.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of nodebb-plugin-emoji@^2.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of nodebb-plugin-emoji@^2.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    
    audited 1361 packages in 3.915s
    
    77 packages are looking for funding
      run `npm fund` for details
    
    found 4 vulnerabilities (3 low, 1 high)
      run `npm audit fix` to fix them, or `npm audit` for details
    
    3. Checking installed plugins for updates...  OK
    4. Updating NodeBB data store schema...2020-10-14T20:07:35.653Z [4567/285096] - warn: [cache-buster] could not read cache buster ENOENT: no such file or directory, open '/home/psc/Downloads/nodebb/build/cache-buster' {"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/psc/Downloads/nodebb/build/cache-buster","stack":"Error: ENOENT: no such file or directory, open '/home/psc/Downloads/nodebb/build/cache-buster'"}
    
    Parsing upgrade scripts... 
    2020-10-14T20:07:35.688Z [4567/285096] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-youtube-lite`. Skipping.
    2020-10-14T20:07:35.688Z [4567/285096] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-anti-spam-question`. Skipping.
    2020-10-14T20:07:35.688Z [4567/285096] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-embed-videos`. Skipping.
    2020-10-14T20:07:35.688Z [4567/285096] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-code-button`. Skipping.
    2020-10-14T20:07:35.689Z [4567/285096] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-soundcloud`. Skipping.
    2020-10-14T20:07:35.689Z [4567/285096] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-custom-pages`. Skipping.
    2020-10-14T20:07:35.689Z [4567/285096] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-vimeo`. Skipping.
    2020-10-14T20:07:35.689Z [4567/285096] - warn: [upgrade/appendPluginScripts] Unable to read plugin.json for plugin `nodebb-plugin-emailer-mailgun`. Skipping.
    OK | 67 script(s) found, 22 skipped
      → [2017/4/16] Delete accidentally long-lived sessions...Error occurred
    Error occurred during upgrade: TypeError: rdb.connect is not a function
        at /home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:26:23
        at nextTask (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4576:27)
        at Object.waterfall (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4587:9)
        at Object.awaitable [as waterfall] (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:208:32)
        at Object.method (/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:22:9)
        at internal/util.js:297:30
        at new Promise (<anonymous>)
        at Object.method (internal/util.js:296:12)
        at /home/psc/Downloads/nodebb/src/upgrade.js:174:8
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:148:38
    2020-10-14T20:07:35.692Z [4567/285096] - error: uncaughtException: rdb.connect is not a function
    TypeError: rdb.connect is not a function
        at /home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:26:23
        at nextTask (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4576:27)
        at Object.waterfall (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4587:9)
        at Object.awaitable [as waterfall] (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:208:32)
        at Object.method (/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:22:9)
        at internal/util.js:297:30
        at new Promise (<anonymous>)
        at Object.method (internal/util.js:296:12)
        at /home/psc/Downloads/nodebb/src/upgrade.js:174:8
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:148:38 {"error":{},"stack":"TypeError: rdb.connect is not a function\n    at /home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:26:23\n    at nextTask (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4576:27)\n    at Object.waterfall (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4587:9)\n    at Object.awaitable [as waterfall] (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:208:32)\n    at Object.method (/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js:22:9)\n    at internal/util.js:297:30\n    at new Promise (<anonymous>)\n    at Object.method (internal/util.js:296:12)\n    at /home/psc/Downloads/nodebb/src/upgrade.js:174:8\n    at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:148:38","exception":true,"date":"Wed Oct 14 2020 16:07:35 GMT-0400 (Eastern Daylight Time)","process":{"pid":285096,"uid":0,"gid":0,"cwd":"/home/psc/Downloads/nodebb","execPath":"/usr/local/bin/node","version":"v12.19.0","argv":["/usr/local/bin/node","/home/psc/Downloads/nodebb/nodebb","upgrade"],"memoryUsage":{"rss":138317824,"heapTotal":92753920,"heapUsed":58033752,"external":1681282,"arrayBuffers":184113}},"os":{"loadavg":[1.21,1.01,1.02],"uptime":28125},"trace":[{"column":23,"file":"/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js","function":null,"line":26,"method":null,"native":false},{"column":27,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":"nextTask","line":4576,"method":null,"native":false},{"column":9,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":"Object.waterfall","line":4587,"method":"waterfall","native":false},{"column":32,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":"Object.awaitable [as waterfall]","line":208,"method":"awaitable [as waterfall]","native":false},{"column":9,"file":"/home/psc/Downloads/nodebb/src/upgrades/1.4.6/delete_sessions.js","function":"Object.method","line":22,"method":"method","native":false},{"column":30,"file":"internal/util.js","function":null,"line":297,"method":null,"native":false},{"column":null,"file":null,"function":"new Promise","line":null,"method":null,"native":false},{"column":12,"file":"internal/util.js","function":"Object.method","line":296,"method":"method","native":false},{"column":8,"file":"/home/psc/Downloads/nodebb/src/upgrade.js","function":null,"line":174,"method":null,"native":false},{"column":38,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":null,"line":148,"method":null,"native":false}]}
    
  • @patrick-sébastien-coulombe why are you running as root/sudo? unsafe-perm shouldn't be necessary.

    Anyways, I think that issue is fixed in this commit: https://github.com/NodeBB/NodeBB/commit/29e3ab247d336220cdddd123fc8703a3a97b1013

    So run git cherry-pick 29e3ab247d336220cdddd123fc8703a3a97b1013 to pull that fix in.

  • @pitaj yes going a bit further

    → [2017/4/14] Set default allowed file extensions... OK
        [#############] (8700/8759) 99%  OKom uploaded profile cover urls...
      → [2017/5/26] rename user mod privileges group...Error occurred
    Error occurred during upgrade: Error: ENOENT: no such file or directory, open '/home/psc/Downloads/nodebb/build/public/templates/admin/partials/widget-settings.tpl'
    2020-10-14T20:40:07.011Z [4567/307201] - error: uncaughtException: ENOENT: no such file or directory, open '/home/psc/Downloads/nodebb/build/public/templates/admin/partials/widget-settings.tpl'
    Error: ENOENT: no such file or directory, open '/home/psc/Downloads/nodebb/build/public/templates/admin/partials/widget-settings.tpl' {"error":{"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/psc/Downloads/nodebb/build/public/templates/admin/partials/widget-settings.tpl"},"stack":"Error: ENOENT: no such file or directory, open '/home/psc/Downloads/nodebb/build/public/templates/admin/partials/widget-settings.tpl'","exception":true,"date":"Wed Oct 14 2020 16:40:07 GMT-0400 (Eastern Daylight Time)","process":{"pid":307201,"uid":0,"gid":0,"cwd":"/home/psc/Downloads/nodebb","execPath":"/usr/local/bin/node","version":"v12.19.0","argv":["/usr/local/bin/node","/home/psc/Downloads/nodebb/nodebb","upgrade"],"memoryUsage":{"rss":278552576,"heapTotal":225935360,"heapUsed":202771344,"external":2048776,"arrayBuffers":551607}},"os":{"loadavg":[0.58,0.84,0.98],"uptime":30076},"trace":[]}
    
  • @patrick-sébastien-coulombe try running ./nodebb build (hopefully it'll complete successfully, if not show the errors here) then re-running the upgrade again.

  • @pitaj Closer and closer! Schema update complete! but failing at step 5.

      → [2019/1/21] Enable StopForumSpam by default without api key... OK
    Schema update complete!
    
    
    5. Rebuilding assets...  started
    2020-10-14T21:57:29.523Z [4567/350261] - error: uncaughtException: callback is not a function
    TypeError: callback is not a function
        at /home/psc/Downloads/nodebb/src/upgrades/1.12.1/clear_username_email_history.js:41:5
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:321:20
        at next (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4450:29)
        at /home/psc/Downloads/nodebb/src/upgrades/1.12.1/clear_username_email_history.js:25:14
        at /home/psc/Downloads/nodebb/src/promisify.js:46:48
        at cb (util.js:207:31)
        at util.js:191:10
        at hidden (internal/errors.js:290:14)
        at processTicksAndRejections (internal/process/task_queues.js:84:21) {"error":{},"stack":"TypeError: callback is not a function\n    at /home/psc/Downloads/nodebb/src/upgrades/1.12.1/clear_username_email_history.js:41:5\n    at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:321:20\n    at next (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:4450:29)\n    at /home/psc/Downloads/nodebb/src/upgrades/1.12.1/clear_username_email_history.js:25:14\n    at /home/psc/Downloads/nodebb/src/promisify.js:46:48\n    at cb (util.js:207:31)\n    at util.js:191:10\n    at hidden (internal/errors.js:290:14)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)","exception":true,"date":"Wed Oct 14 2020 17:57:29 GMT-0400 (Eastern Daylight Time)","process":{"pid":350261,"uid":0,"gid":0,"cwd":"/home/psc/Downloads/nodebb","execPath":"/usr/local/bin/node","version":"v12.19.0","argv":["/usr/local/bin/node","/home/psc/Downloads/nodebb/nodebb","upgrade"],"memoryUsage":{"rss":264130560,"heapTotal":192598016,"heapUsed":96301608,"external":2916871,"arrayBuffers":1419702}},"os":{"loadavg":[1.71,0.74,0.42],"uptime":34719},"trace":[{"column":5,"file":"/home/psc/Downloads/nodebb/src/upgrades/1.12.1/clear_username_email_history.js","function":null,"line":41,"method":null,"native":false},{"column":20,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":null,"line":321,"method":null,"native":false},{"column":29,"file":"/home/psc/Downloads/nodebb/node_modules/async/dist/async.js","function":"next","line":4450,"method":null,"native":false},{"column":14,"file":"/home/psc/Downloads/nodebb/src/upgrades/1.12.1/clear_username_email_history.js","function":null,"line":25,"method":null,"native":false},{"column":48,"file":"/home/psc/Downloads/nodebb/src/promisify.js","function":null,"line":46,"method":null,"native":false},{"column":31,"file":"util.js","function":"cb","line":207,"method":null,"native":false},{"column":10,"file":"util.js","function":null,"line":191,"method":null,"native":false},{"column":14,"file":"internal/errors.js","function":"hidden","line":290,"method":null,"native":false},{"column":21,"file":"internal/process/task_queues.js","function":"processTicksAndRejections","line":84,"method":null,"native":false}]}
    2020-10-14T21:57:29.535Z [4567/350261] - info: [build] Building in parallel mode
    2020-10-14T21:57:29.536Z [4567/350261] - info: [build]         plugin static dirs  build started
    2020-10-14T21:57:29.537Z [4567/350261] - info: [build]          requirejs modules  build started
    2020-10-14T21:57:29.537Z [4567/350261] - info: [build]           client js bundle  build started
    2020-10-14T21:57:29.537Z [4567/350261] - info: [build]            admin js bundle  build started
    2020-10-14T21:57:29.538Z [4567/350261] - info: [build]         client side styles  build started
    2020-10-14T21:57:29.538Z [4567/350261] - info: [build] admin control panel styles  build started
    2020-10-14T21:57:29.538Z [4567/350261] - info: [build]                  templates  build started
    2020-10-14T21:57:29.539Z [4567/350261] - info: [build]                  languages  build started
    2020-10-14T21:57:29.539Z [4567/350261] - info: [build]                     sounds  build started
    2020-10-14T21:57:29.879Z [4567/350261] - info: [build]                     sounds  build completed in 0.34sec
    2020-10-14T21:57:29.900Z [4567/350261] - info: [build]         plugin static dirs  build completed in 0.364sec
    [email protected]:/home/psc/Downloads/nodebb# events.js:291
          throw er; // Unhandled 'error' event
          ^
    
    Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
        at process.target.send (internal/child_process.js:679:16)
        at /home/psc/Downloads/nodebb/src/meta/minifier.js:125:13
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:2955:19
        at wrapper (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:268:20)
        at iteratorCallback (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:495:17)
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:321:20
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:2953:17
        at /home/psc/Downloads/nodebb/node_modules/graceful-fs/graceful-fs.js:144:16
        at /home/psc/Downloads/nodebb/node_modules/graceful-fs/graceful-fs.js:61:14
        at FSReqCallback.oncomplete (fs.js:156:23)
    Emitted 'error' event on process instance at:
        at internal/child_process.js:683:35
        at processTicksAndRejections (internal/process/task_queues.js:79:11) {
      code: 'ERR_IPC_CHANNEL_CLOSED'
    }
    events.js:291
          throw er; // Unhandled 'error' event
          ^
    
    Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
        at process.target.send (internal/child_process.js:679:16)
        at /home/psc/Downloads/nodebb/src/meta/minifier.js:125:13
        at wrapper (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:268:20)
        at iterateeCallback (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:421:28)
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:321:20
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:2955:19
        at wrapper (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:268:20)
        at iteratorCallback (/home/psc/Downloads/nodebb/node_modules/async/dist/async.js:495:17)
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:321:20
        at /home/psc/Downloads/nodebb/node_modules/async/dist/async.js:2953:17
    Emitted 'error' event on process instance at:
        at internal/child_process.js:683:35
        at processTicksAndRejections (internal/process/task_queues.js:79:11) {
      code: 'ERR_IPC_CHANNEL_CLOSED'
    }
    events.js:291
          throw er; // Unhandled 'error' event
          ^
    
    Error: write EPIPE
        at process.target._send (internal/child_process.js:806:20)
        at process.target.send (internal/child_process.js:677:19)
        at /home/psc/Downloads/nodebb/src/meta/minifier.js:125:13
        at processTicksAndRejections (internal/process/task_queues.js:84:21)
    Emitted 'error' event on process instance at:
        at internal/child_process.js:810:39
        at processTicksAndRejections (internal/process/task_queues.js:79:11) {
      errno: 'EPIPE',
      code: 'EPIPE',
      syscall: 'write'
    }
    events.js:291
          throw er; // Unhandled 'error' event
          ^
    
    Error: write EPIPE
        at process.target._send (internal/child_process.js:806:20)
        at process.target.send (internal/child_process.js:677:19)
        at /home/psc/Downloads/nodebb/src/meta/minifier.js:125:13
        at processTicksAndRejections (internal/process/task_queues.js:84:21)
    Emitted 'error' event on process instance at:
        at internal/child_process.js:810:39
        at processTicksAndRejections (internal/process/task_queues.js:79:11) {
      errno: 'EPIPE',
      code: 'EPIPE',
      syscall: 'write'
    }
    


Suggested Topics