I am trying to install by following these instructions at https://docs.nodebb.org/configuring/databases/mongo/
I got up to the part where it says to create the db and add user. That part worked OK and I got a confirmation message in the terminal.
However, the next part which is:
<db.grantRolesToUser("nodebb",[{ role: "clusterMonitor", db: "admin" }]);/>
didn't seem to do anything. I didn't get any error message but nothing happened.
Anyway I kept going and I tried to modify the
/etc/mongodb.conf
However, when I checked that by going to the file, I couldn't find security:
so there was nothing to add to the file.
It just contained:
destination: file
path: /usr/local/var/log/mongodb/mongo.log
logAppend: true
storage:
dbPath: /usr/local/var/mongodb
net:
bindIp: 127.0.0.1
So I wasn't sure if the installation was going to work. Anyhow I did the next step which was to restart mongodb.
So I put in the command:
service mongodb restart
However, that command did not seem to do anything. But I think the mongo shell was still open. I opened it in a separate terminal window.
Then I followed the two next steps which were:
$ cd /path/to/nodebb
and
$ node app --setup
.
After I put in the last command, I got an error message:
bb/nodebb/app.js:39
const configFile = path.resolve(__dirname, nconf.any(['config', 'CONFIG']) || 'config.json');
^
TypeError: nconf.any is not a function
at Object.<anonymous> (/Users/home/Downloads/WEBSITE/experiments/nodebb/nodebb/app.js:39:50)
I don't know what I'm doing wrong or if there is a bug in the app.js file.