NodeBB Crashed after upgrade



  • 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:

    yilm@yilm:~/nodebb$ ./nodebb upgrade
    npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
    npm WARN deprecated connect@2.7.6: connect 2.x series is deprecated
    npm WARN deprecated pygmentize-bundled@2.1.1: no longer maintained
    npm ERR! code ETARGET
    npm ERR! notarget No matching version found for i@0.3.2
    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 lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
    npm WARN deprecated connect@2.7.6: connect 2.x series is deprecated
    npm WARN deprecated pygmentize-bundled@2.1.1: no longer maintained
    npm ERR! code ETARGET
    npm ERR! notarget No matching version found for i@0.3.2
    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!


  • Global Moderator

    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.


  • Admin

    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:

    yilm@yilm:~/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:

    yilm@yilm:~/nodebb$ ./nodebb upgrade
    npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
    npm WARN deprecated connect@2.7.6: connect 2.x series is deprecated
    npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
    npm WARN deprecated pygmentize-bundled@2.1.1: no longer maintained
    npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
    npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated npmconf@1.1.9: this package has been reintegrated into npm and is now out of date with respect to npm
    npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
    npm WARN deprecated minimatch@2.0.10: 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 npm@latest -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 nodebb@0.4.3 license should be a valid SPDX license expression

    • nodebb-theme-vanilla@0.0.18
    • nodebb-theme-lavender@0.0.25
      removed 550 packages and updated 2 packages in 8.355s
      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/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:

    yilm@yilm:~/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 nodebb@0.4.3

    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/

    yilm@yilm:~/nodebb$ npm -v
    5.6.0
    yilm@yilm:~/nodebb$ nodejs -v
    v8.11.3

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


  • Global Moderator

    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:

    yilm@yilm:~/$ git clone -b v1.10.x https://github.com/NodeBB/NodeBB.git nodebb
    yilm@yilm:~$ ./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

  • 4
  • 1
  • 8
  • 1
  • 4
| |