NodeBB Crashed after upgrade

Technical Support
  • Installed nodebb today and had it working fine. It had a notification informing me I should upgrade. I clicked the link, and followed the instructions as seen here:

    After I ran ./nodebb upgrade I got errors, and now it won't start at all.

    Help!

    Here's the ./nodebb upgrade output:

    [email protected]:~/nodebb$ ./nodebb upgrade
    npm WARN read-shrinkwrap This version of npm is compatible with [email protected], but npm-shrinkwrap.json was generated for [email protected]. I'll try to do my best with it!
    npm WARN deprecated [email protected]: connect 2.x series is deprecated
    npm WARN deprecated [email protected]: no longer maintained
    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.

    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/yilm/.npm/_logs/2018-07-11T03_18_44_083Z-debug.log
    npm WARN read-shrinkwrap This version of npm is compatible with [email protected], but npm-shrinkwrap.json was generated for [email protected]. I'll try to do my best with it!
    npm WARN deprecated [email protected]: connect 2.x series is deprecated
    npm WARN deprecated [email protected]: no longer maintained
    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.

    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/yilm/.npm/logs/2018-07-11T03_18_48_110Z-debug.log
    /home/yilm/nodebb/public/src/utils.js:104
    invalidUnicodeChars: XRegExp('[^\p{L}\s\d\-
    ]', 'g'),
    ^

    TypeError: XRegExp is not a function
    at undefined.module.module.exports (/home/yilm/nodebb/public/src/utils.js:104:24)
    at Object.<anonymous> (/home/yilm/nodebb/public/src/utils.js:282:3)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/yilm/nodebb/app.js:32:10)

    NodeBB Dependencies up-to-date!

  • What version for you upgrade from? It looks like npm is finding a shrinkwrap file which is super old. You should delete that and try again.

  • Agreed, you should probably delete npm-shrinkwrap.json and package-lock.json and run ./nodebb upgrade again

  • OK! I'll do that in a min. First, I wanted to add the following output:

    [email protected]:~/nodebb$ ./nodebb start
    Starting NodeBB
    "./nodebb stop" to stop the NodeBB server
    "./nodebb log" to view server output
    child_process.js:403
    throw new TypeError('"cwd" must be a string');
    ^

    TypeError: "cwd" must be a string
    at normalizeSpawnArguments (child_process.js:403:11)
    at Object.exports.spawn (child_process.js:496:38)
    at Function.module.exports.daemon (/home/yilm/nodebb/node_modules/daemon/index.js:50:31)
    at module.exports (/home/yilm/nodebb/node_modules/daemon/index.js:25:20)
    at Object.<anonymous> (/home/yilm/nodebb/loader.js:93:19)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

  • OK, I ran ./nodebb upgrade after deleting the above mentioned files. No dice.

    Here's the output:

    [email protected]:~/nodebb$ ./nodebb upgrade
    npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
    npm WARN deprecated [email protected]: connect 2.x series is deprecated
    npm WARN deprecated [email protected]: Use uuid module instead
    npm WARN deprecated [email protected]: no longer maintained
    npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN notice [SECURITY] npm has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=npm&version=1.4.29 - Run npm i [email protected] -g to upgrade your npm version, and then npm audit to get more info.
    npm ERR! code ETARGET
    npm ERR! notarget No matching version found for nodebb-widget-essentials@~0.0.21
    npm ERR! notarget In most cases you or one of your dependencies are requesting
    npm ERR! notarget a package version that doesn't exist.
    npm ERR! notarget
    npm ERR! notarget It was specified as a dependency of 'nodebb'
    npm ERR! notarget

    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/yilm/.npm/_logs/2018-07-11T17_50_42_742Z-debug.log
    [..................] / rollbackFailedOptional: verb npm-sessio
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN [email protected] license should be a valid SPDX license expression

    Error: Cannot find module 'nconf'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/yilm/nodebb/app.js:23:13)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

    NodeBB Dependencies up-to-date!

    Now, I'm getting a different error when I run ./nodebb start:

    [email protected]:~/nodebb$ ./nodebb start
    Starting NodeBB
    "./nodebb stop" to stop the NodeBB server
    "./nodebb log" to view server output
    module.js:549
    throw err;
    ^

    Error: Cannot find module 'nconf'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/yilm/nodebb/loader.js:3:13)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

    Because it is a fresh install to begin with (nothing to loose), how would I remove nodebb from my server so I can try a fresh reinstall and then upgrade again? Or better yet, reinstall the latest instead so as to skip the upgrade.

    I followed the Ubuntu install (https://docs.nodebb.org/installing/os/ubuntu/) - how do I just reinstall the latest version?

    I am assuming I need to change 1.9.x to 1.10.x in the following command:

    git clone -b v1.9.x https://github.com/NodeBB/NodeBB.git nodebb

    Am I right?

  • There are many things in this log I find kind of strange.

    What NPM version have you installed? According to that Node Security output 1.4.29? That would be way outdated. And thus probably also running a way outdated NodeJS?

    Are you sure you followed that documentation? Because it seems you have NodeBB 0.4.3 on your system? npm WARN [email protected]

    To reinstall from start by losing all your data, just remove the NodeBB directory, drop the database and start fresh. But I highly recommend to first make sure that you run at least NodeJS 6.x and an up-to-date NPM.

  • @dravere Yes. Followed instructions here: https://docs.nodebb.org/installing/os/ubuntu/

    [email protected]:~/nodebb$ npm -v
    5.6.0
    [email protected]:~/nodebb$ nodejs -v
    v8.11.3

    How do I drop the DB? I am familiar with MySQL, but not Mongo.

  • What version of NodeBB were you on? What version did you upgrade to?

  • @pitaj It was 1.9.something and upgraded to 1.10.something.

  • OK. I removed nodebb foler, but didn't drop the db.

    Ran:

    [email protected]:~/$ git clone -b v1.10.x https://github.com/NodeBB/NodeBB.git nodebb
    [email protected]:~$ ./nodebb setup

    No errors. Everything is now up and running.

  • Good to hear. Just in case you need it in the future.

    MongoDB has very good documentation and you can find it here: https://docs.mongodb.com/

    Dropping the database would be described here: https://docs.mongodb.com/manual/reference/method/db.dropDatabase/index.html

    Thus probably would be something along the line of:

    use nodebb
    db.dropDatabase()
    


Suggested Topics


  • 1 Votes
    22 Posts
    348 Views
  • 0 Votes
    30 Posts
    1348 Views
  • 0 Votes
    4 Posts
    415 Views
  • 0 Votes
    9 Posts
    3651 Views
  • 0 Votes
    6 Posts
    1882 Views