NodeBB Crashed after upgrade
-
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.
-
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 [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 - Runnpm i npm@latest -g
to upgrade your npm version, and thennpm 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! notargetnpm 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- [email protected]
- [email protected]
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 [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/
yilm@yilm:~/nodebb$ npm -v
5.6.0
yilm@yilm:~/nodebb$ nodejs -v
v8.11.3How 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?
-
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 setupNo 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()