Error starting NodeBB after upgrade

Solved Technical Support
  • [root@daermabb ~]# nvm install v8.0.0
    Downloading and installing node v8.0.0...
    Downloading https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz...
    ######################################################################## 100.0%
    Computing checksum with sha256sum
    Checksums matched!
    Now using node v8.0.0 (npm v5.0.0)
    [root@daermabb ~]# cp /var/lib/redis/dump.rdb /opt/daerma/redisbackup/dump.rdb.20170530
    [root@daermabb ~]# cd /opt/daerma/nodebb/ 
    [root@daermabb nodebb]# git branch
      master
      v0.9.x
    * v1.x.x
    [root@daermabb nodebb]# git pull
    remote: Counting objects: 4439, done.
    remote: Compressing objects: 100% (44/44), done.
    remote: Total 4439 (delta 2279), reused 2296 (delta 2270), pack-reused 2125
    Receiving objects: 100% (4439/4439), 1002.30 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (3434/3434), completed with 1024 local objects.
    From https://github.com/NodeBB/NodeBB
       d19e59f..fb2f857  v1.x.x     -> origin/v1.x.x
     * [new branch]      ban-improvements -> origin/ban-improvements
       e121a5a..3a1eba2  develop    -> origin/develop
     * [new branch]      import-export-ref -> origin/import-export-ref
       08f0010..ba93979  master     -> origin/master
     * [new branch]      v1.5.x     -> origin/v1.5.x
     * [new tag]         v1.4.6     -> v1.4.6
     * [new tag]         v1.5.1     -> v1.5.1
    From https://github.com/NodeBB/NodeBB
     * [new tag]         v1.5.0     -> v1.5.0
    Updating d19e59f..fb2f857
    Fast-forward
    >snip all the git stuff<
    
    [root@daermabb nodebb]# npm install
    npm WARN deprecated [email protected]: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN [email protected] requires a peer of eslint@^3.19.0 but none was installed.
    
    added 59 packages, removed 438 packages and updated 156 packages in 39.311s
    

    Now the nodebb upgrade

    [root@daermabb nodebb]# ./nodebb upgrade
    1. Bringing base dependencies up to date... OK
    2. Checking installed plugins for updates... OK
    3. Updating NodeBB data store schema...
    30/5 14:01:30 [12817] - info: Beginning database schema update
    30/5 14:01:30 [12817] - info: [2016/09/22] Setting category recent tids - skipped!
    30/5 14:01:30 [12817] - info: [2016/10/8] favourite -> bookmark refactor - skipped!
    30/5 14:01:30 [12817] - info: [2016/10/14] Creating sorted sets for post replies - skipped!
    30/5 14:01:30 [12817] - info: [2016/11/22] Update global and user language keys - skipped!
    30/5 14:01:30 [12817] - info: [2016/11/25] Creating sorted sets for pinned topics - skipped!
    30/5 14:01:30 [12817] - info: [2017/2/25] Update global and user sound settings - skipped!
    30/5 14:01:30 [12817] - info: [2017/2/28] Update urls in config to `/assets` - skipped!
    30/5 14:01:30 [12817] - info: [2017/4/16] Delete sessions
    30/5 14:01:34 [12817] - info: [2017/4/16] Delete sessions - done
    30/5 14:01:34 [12817] - info: [upgrade] Schema update complete!
    30/5 14:01:34 [12817] - info: [build] Building javascript
    30/5 14:01:45 [12817] - info: [build] js => Completed in 11.268s
    30/5 14:01:45 [12817] - info: [build] Building client-side CSS
    30/5 14:01:49 [12817] - info: [build] clientCSS => Completed in 3.583s
    30/5 14:01:49 [12817] - info: [build] Building admin control panel CSS
    30/5 14:01:52 [12817] - info: [build] acpCSS => Completed in 2.97s
    30/5 14:01:52 [12817] - info: [build] Building templates
    30/5 14:01:52 [12817] - info: [build] tpl => Completed in 0.332s
    30/5 14:01:52 [12817] - info: [build] Building language files
    30/5 14:01:57 [12817] - info: [build] lang => Completed in 5.015s
    30/5 14:01:57 [12817] - info: [build] Linking sound files
    30/5 14:01:57 [12817] - info: [build] sound => Completed in 0.004s
    30/5 14:01:57 [12817] - info: [build] Asset compilation successful. Completed in 23.263s.
    OK
    
                                                            NodeBB Upgrade Complete!
    
    [root@daermabb nodebb]# ./nodebb build
    30/5 14:02:09 [12853] - info: [build] Building javascript
    30/5 14:02:20 [12853] - info: [build] js => Completed in 10.572s
    30/5 14:02:20 [12853] - info: [build] Building client-side CSS
    30/5 14:02:23 [12853] - info: [build] clientCSS => Completed in 3.47s
    30/5 14:02:23 [12853] - info: [build] Building admin control panel CSS
    30/5 14:02:26 [12853] - info: [build] acpCSS => Completed in 2.892s
    30/5 14:02:26 [12853] - info: [build] Building templates
    30/5 14:02:26 [12853] - info: [build] tpl => Completed in 0.147s
    30/5 14:02:26 [12853] - info: [build] Building language files
    30/5 14:02:29 [12853] - info: [build] lang => Completed in 2.548s
    30/5 14:02:29 [12853] - info: [build] Linking sound files
    30/5 14:02:29 [12853] - info: [build] sound => Completed in 0.009s
    30/5 14:02:29 [12853] - info: [build] Asset compilation successful. Completed in 22.267s.
    

    This is what startup shows me.

    [root@daermabb nodebb]# ./nodebb slog
    
    Starting NodeBB with logging output
    
    Hit Ctrl-C to exit
    
    28/5 18:16:41 [5198] - warn: [deprecated] Accessing `src/modules/composer/tags.js` from `/` is deprecated. Use `/assets/src/modules/composer/tags.js` to access this file.
    node_redis: Deprecated: The ZRANK command contains a "null" argument.
    This is converted to a "null" string now and will return an error from v.3.0 on.
    Please handle this in your code to make sure everything works as you intended it to.
    29/5 08:43:21 [5198] - warn: [deprecated] Accessing `language/en_US/topic.json` from `/` is deprecated. Use `/assets/language/en_US/topic.json` to access this file.
    30/5 13:48:40 [5198] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    [cluster] Child Process (5198) has exited (code: 0, signal: null)
    30/5 13:48:40 [5198] - info: [app] Database connection closed.
    30/5 13:48:40 [5198] - info: [app] Web server closed to connections.
    30/5 13:48:40 [5198] - info: [app] Shutdown complete.
    child_process.js:380
        throw new TypeError('"cwd" must be a string');
        ^
    
    TypeError: "cwd" must be a string
        at normalizeSpawnArguments (child_process.js:380:11)
        at Object.exports.spawn (child_process.js:465:38)
        at Function.module.exports.daemon (/opt/daerma/nodebb/node_modules/daemon/index.js:50:31)
        at module.exports (/opt/daerma/nodebb/node_modules/daemon/index.js:25:20)
        at /opt/daerma/nodebb/loader.js:223:21
        at FSReqWrap.oncomplete (fs.js:135:15)
    
  • Node.js v7.10.0 works perfectly.

  • If I launch it with ./nodebb dev it loads.

    [root@daermabb nodebb]# ./nodebb dev
    
    NodeBB v1.4.6 Copyright (C) 2013-2014 NodeBB Inc.
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it under certain conditions.
    For the full license, please visit: http://www.gnu.org/copyleft/gpl.html
    
    Clustering enabled: Spinning up 1 process(es).
    
    30/5 14:19:17 [14313] - verbose: * using configuration stored in: /opt/daerma/nodebb/config.json
    30/5 14:19:17 [14313] - info: Initializing NodeBB v1.4.6
    30/5 14:19:17 [14313] - verbose: * using redis store at 127.0.0.1:6379
    30/5 14:19:17 [14313] - verbose: * using themes stored in: /opt/daerma/nodebb/node_modules
    30/5 14:19:18 [14313] - verbose: Checking dependencies for outdated modules
    30/5 14:19:20 [14313] - verbose: [notifications.init] Registering jobs.
    30/5 14:19:20 [14313] - verbose: [user/jobs] (Re-)starting user jobs...
    30/5 14:19:20 [14313] - verbose: [user/jobs] 0 jobs terminated
    30/5 14:19:20 [14313] - verbose: [user/jobs] Starting job (digest.daily)
    30/5 14:19:20 [14313] - verbose: [user/jobs] Starting job (digest.weekly)
    30/5 14:19:20 [14313] - verbose: [user/jobs] Starting job (digest.monthly)
    30/5 14:19:20 [14313] - verbose: [user/jobs] Starting job (reset.clean)
    30/5 14:19:20 [14313] - verbose: [user/jobs] 4 jobs started
    30/5 14:19:20 [14313] - info: [themes] Using theme nodebb-theme-persona
    30/5 14:19:20 [14313] - verbose: [plugins] Initializing plugins system
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-composer-default
    30/5 14:19:20 [14313] - verbose: [plugins] Found 2 js file(s) for plugin nodebb-plugin-composer-default
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/client.js
    30/5 14:19:20 [14313] - verbose: [plugins/load] File not found: /opt/daerma/nodebb/node_modules/nodebb-plugin-composer-default/node_modules/screenfull/dist/screenfull.js (Ascending)
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/screenfull/dist/screenfull.js
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-composer-default
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-plugin-composer-default/static/lib/admin.js
    30/5 14:19:20 [14313] - verbose: [plugins] Found 10 AMD-style module(s) for plugin nodebb-plugin-composer-default
    30/5 14:19:20 [14313] - verbose: [plugins] Loaded plugin: nodebb-plugin-composer-default
    30/5 14:19:20 [14313] - verbose: [plugins] Found 6 js file(s) for plugin nodebb-theme-persona
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-theme-persona/lib/persona.js
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-theme-persona/lib/modules/nprogress.js
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-theme-persona/lib/modules/autohidingnavbar.min.js
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-theme-persona/lib/modules/slideout.min.js
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-theme-persona/lib/modules/quickreply.js
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-theme-persona/lib/client/chats.js
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-theme-persona
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-theme-persona/lib/admin.js
    30/5 14:19:20 [14313] - verbose: [plugins] Loaded plugin: nodebb-theme-persona
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-markdown
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-markdown
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-plugin-markdown/public/js/client.js
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-markdown
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-plugin-markdown/public/js/admin.js
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 AMD-style module(s) for plugin nodebb-plugin-markdown
    30/5 14:19:20 [14313] - verbose: [plugins] Loaded plugin: nodebb-plugin-markdown
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-mentions
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-mentions
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-plugin-mentions/static/autofill.js
    30/5 14:19:20 [14313] - verbose: [plugins] Loaded plugin: nodebb-plugin-mentions
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 css file(s) for plugin nodebb-widget-essentials
    30/5 14:19:20 [14313] - verbose: [plugins] Loaded plugin: nodebb-widget-essentials
    30/5 14:19:20 [14313] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-rewards-essentials
    30/5 14:19:20 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-rewards-essentials/static/lib/main.js
    30/5 14:19:20 [14313] - verbose: [plugins] Loaded plugin: nodebb-rewards-essentials
    30/5 14:19:20 [14313] - verbose: [plugins] Loaded plugin: nodebb-plugin-soundpack-default
    30/5 14:19:21 [14313] - verbose: [plugins] Loaded plugin: nodebb-plugin-dbsearch
    30/5 14:19:21 [14313] - verbose: [plugins] Loaded plugin: nodebb-plugin-emoji-one
    30/5 14:19:21 [14313] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-emoji-extended
    30/5 14:19:21 [14313] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-emoji-extended
    30/5 14:19:21 [14313] - verbose: [plugins/load] File found: /opt/daerma/nodebb/node_modules/nodebb-plugin-emoji-extended/public/scripts/
    30/5 14:19:21 [14313] - verbose: [plugins] Loaded plugin: nodebb-plugin-emoji-extended
    30/5 14:19:21 [14313] - info: [plugins] Plugins OK
    30/5 14:19:21 [14313] - verbose: [hotswap] Router with id `plugins` replaced successfully
    30/5 14:19:21 [14313] - verbose: [plugins] All plugins reloaded and rerouted
    30/5 14:19:21 [14313] - verbose: [hotswap] Router with id `auth` replaced successfully
    30/5 14:19:21 [14313] - info: Routes added
    30/5 14:19:21 [14313] - verbose: [meta/blacklist] Loading 0 blacklist rules
    30/5 14:19:21 [14313] - info: NodeBB Ready
    30/5 14:19:21 [14313] - info: Enabling 'trust proxy'
    30/5 14:19:21 [14313] - info: NodeBB is now listening on: 0.0.0.0:4567
    30/5 14:19:50 [14313] - warn: Missing translation "pages:flagged-posts"
    ^C
    30/5 14:20:02 [14313] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    30/5 14:20:02 [14313] - info: [app] Database connection closed.
    30/5 14:20:02 [14313] - info: [app] Web server closed to connections.
    30/5 14:20:02 [14313] - info: [app] Shutdown complete.
    
    [root@daermabb nodebb]# ./nodebb slog
    
    Starting NodeBB with logging output
    
    Hit Ctrl-C to exit
    
    28/5 18:16:41 [5198] - warn: [deprecated] Accessing `src/modules/composer/tags.js` from `/` is deprecated. Use `/assets/src/modules/composer/tags.js` to access this file.
    node_redis: Deprecated: The ZRANK command contains a "null" argument.
    This is converted to a "null" string now and will return an error from v.3.0 on.
    Please handle this in your code to make sure everything works as you intended it to.
    29/5 08:43:21 [5198] - warn: [deprecated] Accessing `language/en_US/topic.json` from `/` is deprecated. Use `/assets/language/en_US/topic.json` to access this file.
    30/5 13:48:40 [5198] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    [cluster] Child Process (5198) has exited (code: 0, signal: null)
    30/5 13:48:40 [5198] - info: [app] Database connection closed.
    30/5 13:48:40 [5198] - info: [app] Web server closed to connections.
    30/5 13:48:40 [5198] - info: [app] Shutdown complete.
    child_process.js:380
        throw new TypeError('"cwd" must be a string');
        ^
    
    TypeError: "cwd" must be a string
        at normalizeSpawnArguments (child_process.js:380:11)
        at Object.exports.spawn (child_process.js:465:38)
        at Function.module.exports.daemon (/opt/daerma/nodebb/node_modules/daemon/index.js:50:31)
        at module.exports (/opt/daerma/nodebb/node_modules/daemon/index.js:25:20)
        at /opt/daerma/nodebb/loader.js:223:21
        at FSReqWrap.oncomplete (fs.js:135:15)
    ^C
    [root@daermabb nodebb]# 
    
  • We don't support or test on Node.js version 8 and there could very well be issues using npm@5 as well. I suggest dropping to Node.js versions 4-7

  • @PitaJ said in Error starting NodeBB after upgrade:

    We don't support or test on Node.js version 8 and there could very well be issues using npm@5 as well. I suggest dropping to Node.js versions 4-7

    Can do. I simply updated to current as I always do when I update.

    It was on 7.5 prior.

  • Node.js v7.10.0 works perfectly.

  • @PitaJ Permissions on here are odd for the ask as question plugin. I can only mark my own posts as an answer.

    0_1496172631198_7897798c-d801-467c-a8d0-6871139fadb6-image.png
    0_1496172652106_794451b1-bbd7-4053-852f-93e0e3b788bc-image.png

  • @PitaJ : I don't think that not supporting Node 8 is an option in the long term as it will be the new LTS release of Node.js

    Anyway, this error is located in the daemon package and is easily fixed.
    I've created a Pull Request for that issue, and if it is accepted, we'll just have to update the dependencie version of that package in package.json

  • @zipang yes of course we'll support Node 8 but to do so we have to drop support for all Node versions prior to v6. You can understand why we'd be hesitant to do so so quickly after our last major version release.


Suggested Topics