URGENT, Cannot install on Rocky 9
-
There are a huge number of errors during the restore which I thought might be normal since sine indexes already existed from the new install. I also tried by completely removing the nodebb database first then using restore and then starting nodebb after running build and npm. I think but not sure since I've been at this for a while now.
$ node -v v18.16.0 $ npm -v 9.5.1 $ cat package.json { "name": "nodebb", "license": "GPL-3.0", "description": "NodeBB Forum", "version": "3.1.3", "homepage": "https://www.nodebb.org", "repository": { "type": "git", "url": "https://github.com/NodeBB/NodeBB/" }, "main": "app.js", "scripts": { "start": "node loader.js", "lint": "eslint --cache ./nodebb .", "test": "nyc --reporter=html --reporter=text-summary mocha", "coverage": "nyc report --reporter=text-lcov > ./coverage/lcov.info", "coveralls": "nyc report --reporter=text-lcov | coveralls && rm -r coverage" }, "nyc": { "exclude": [ "src/upgrades/*", "test/*" ] }, "lint-staged": { "*.js": [ "eslint --fix" ] }, "dependencies": { "@adactive/bootstrap-tagsinput": "0.8.2", "@isaacs/ttlcache": "1.4.0", "@popperjs/core": "2.11.7", "@socket.io/redis-adapter": "8.2.0", "ace-builds": "1.19.0", "archiver": "5.3.1", "async": "3.2.4", "autoprefixer": "10.4.14", "bcryptjs": "2.4.3", "benchpressjs": "2.5.1", "body-parser": "1.20.2", "bootbox": "6.0.0", "bootstrap": "5.2.3", "bootswatch": "5.2.3", "chalk": "4.1.2", "chart.js": "2.9.4", "cli-graph": "3.2.2", "clipboard": "2.0.11", "colors": "1.4.0", "commander": "10.0.1", "compare-versions": "5.0.3", "compression": "1.7.4", "connect-flash": "0.1.1", "connect-mongo": "5.0.0", "connect-multiparty": "2.2.0", "connect-pg-simple": "8.0.0", "connect-redis": "7.0.1", "cookie-parser": "1.4.6", "cron": "2.3.0", "cropperjs": "1.5.13", "csrf-sync": "4.0.1", "daemon": "1.1.0", "diff": "5.1.0", "esbuild": "0.17.18", "express": "4.18.2", "express-session": "1.17.3", "express-useragent": "1.0.15", "file-loader": "6.2.0", "fs-extra": "11.1.1", "graceful-fs": "4.2.11", "helmet": "6.2.0", "html-to-text": "9.0.5", "ioredis": "5.3.2", "ipaddr.js": "2.0.1", "jquery": "3.6.4", "jquery-deserialize": "2.0.0", "jquery-form": "4.3.0", "jquery-serializeobject": "1.0.0", "jquery-ui": "1.13.2", "jsesc": "3.0.2", "json2csv": "5.0.7", "jsonwebtoken": "9.0.0", "less": "4.1.3", "lodash": "4.17.21", "logrotate-stream": "0.2.9", "lru-cache": "9.1.1", "material-design-lite": "1.3.0", "mime": "3.0.0", "mkdirp": "3.0.1", "mongodb": "5.4.0", "morgan": "1.10.0", "mousetrap": "1.6.5", "multiparty": "4.2.3", "nconf": "0.12.0", "nodebb-plugin-2factor": "7.0.5", "nodebb-plugin-composer-default": "10.1.5", "nodebb-plugin-dbsearch": "6.0.1", "nodebb-plugin-emoji": "5.0.10", "nodebb-plugin-emoji-android": "4.0.0", "nodebb-plugin-markdown": "12.0.3", "nodebb-plugin-mentions": "4.1.1", "nodebb-plugin-ntfy": "1.0.15", "nodebb-plugin-question-and-answer": "^1.0.19", "nodebb-plugin-spam-be-gone": "^0.4.4", "nodebb-rewards-essentials": "0.2.3", "nodebb-theme-harmony": "1.0.24", "nodebb-theme-lavender": "7.0.9", "nodebb-theme-peace": "2.0.22", "nodebb-theme-persona": "13.0.65", "nodebb-widget-essentials": "7.0.12", "nodemailer": "6.9.1", "nprogress": "0.2.0", "passport": "0.6.0", "passport-http-bearer": "1.0.1", "passport-local": "1.0.0", "pg": "8.10.0", "pg-cursor": "2.9.0", "postcss": "8.4.23", "postcss-clean": "1.2.0", "progress-webpack-plugin": "1.0.16", "prompt": "1.3.0", "request": "2.88.2", "request-promise-native": "^0.0.0", "rimraf": "5.0.0", "rss": "1.2.2", "rtlcss": "4.1.0", "sanitize-html": "2.10.0", "sass": "1.62.1", "semver": "7.5.0", "serve-favicon": "2.5.0", "sharp": "0.32.1", "sitemap": "7.1.1", "slideout": "1.0.1", "socket.io": "4.6.1", "socket.io-client": "4.6.1", "sortablejs": "1.15.0", "spdx-license-list": "6.6.0", "spider-detector": "2.0.0", "terser-webpack-plugin": "5.3.8", "textcomplete": "0.18.2", "textcomplete.contenteditable": "0.1.1", "timeago": "1.6.7", "tinycon": "0.6.8", "toobusy-js": "0.5.1", "validator": "13.9.0", "webpack": "5.82.0", "webpack-merge": "5.8.0", "winston": "3.8.2", "xml": "1.0.1", "xregexp": "5.1.1", "yargs": "17.7.2", "zxcvbn": "4.4.2" }, "devDependencies": { "@apidevtools/swagger-parser": "10.1.0", "@commitlint/cli": "17.6.3", "@commitlint/config-angular": "17.6.3", "coveralls": "3.1.1", "eslint": "8.40.0", "eslint-config-nodebb": "0.2.1", "eslint-plugin-import": "2.27.5", "grunt": "1.6.1", "grunt-contrib-watch": "1.1.0", "husky": "8.0.3", "jsdom": "22.0.0", "lint-staged": "13.2.2", "mocha": "10.2.0", "mocha-lcov-reporter": "1.3.0", "mockdate": "3.0.5", "nyc": "15.1.0", "smtp-server": "3.11.0" }, "optionalDependencies": { "sass-embedded": "1.62.0" }, "resolutions": { "*/jquery": "3.6.4" }, "bugs": { "url": "https://github.com/NodeBB/NodeBB/issues" }, "engines": { "node": ">=12" }, "maintainers": [ { "name": "Julian Lam", "email": "[email protected]", "url": "https://github.com/julianlam" }, { "name": "Barış Soner Uşaklı", "email": "[email protected]", "url": "https://github.com/barisusakli" } ] }
-
NodeBB/install/package.json at master · NodeBB/NodeBB
Node.js based forum software built for the modern web - NodeBB/install/package.json at master · NodeBB/NodeBB
GitHub (github.com)
Your package.json has a wrong value. Try replacing it with install/package.json and run the above commands again.
-
$ ./nodebb start && ./nodebb log Starting NodeBB "./nodebb stop" to stop the NodeBB server "./nodebb log" to view server output "./nodebb help" for more commands Process "3559" from pidfile not found, deleting pidfile Hit Ctrl-C to exit at Module.load (node:internal/modules/cjs/loader:1117:32) [cluster] Child Process (3570) has exited (code: 0, signal: null) NodeBB v3.1.3 Copyright (C) 2013-2023 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). 2023-05-18T19:56:17.884Z [4567/4024] - info: Initializing NodeBB v3.1.3 https://support.domain.com 2023-05-18T19:56:22.248Z [4567/4024] - info: [socket.io] Restricting access to origin: https://support.domain.com:* 2023-05-18T19:56:23.110Z [4567/4024] - warn: [plugins] "nodebb-plugin-question-and-answer" is active but not installed. 2023-05-18T19:56:23.413Z [4567/4024] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it. * nodebb-rewards-essentials 2023-05-18T19:56:23.761Z [4567/4024] - warn: [plugins] "nodebb-plugin-question-and-answer" is active but not installed. 2023-05-18T19:56:24.730Z [4567/4024] - info: [api] Adding 0 route(s) to `api/v3/plugins` 2023-05-18T19:56:24.769Z [4567/4024] - info: [router] Routes added 2023-05-18T19:56:25.108Z [4567/4024] - info: 🎉 NodeBB Ready 2023-05-18T19:56:25.116Z [4567/4024] - info: 🤝 Enabling 'trust proxy' 2023-05-18T19:56:25.128Z [4567/4024] - info: 📡 NodeBB is now listening on: 0.0.0.0:4567 2023-05-18T19:56:25.128Z [4567/4024] - info: 🔗 Canonical URL: https://support.domain.com DEPRECATION WARNING on line 68, column 52 of ../../node_modules/bootswatch/dist/flatly/_variables.scss: !default should only be written once for each variable. This will be an error in Dart Sass 2.0.0. ╷ 68 │ $nav-link-padding-y: .5rem !default !default; │ ^^^^^^^^ ╵ DEPRECATION WARNING on line 70, column 56 of ../../node_modules/bootswatch/dist/flatly/_variables.scss: !default should only be written once for each variable. This will be an error in Dart Sass 2.0.0. ╷ 70 │ $nav-link-disabled-color: $gray-600 !default !default; │ ^^^^^^^^ ╵ DEPRECATION WARNING on line 79, column 60 of ../../node_modules/bootswatch/dist/litera/_variables.scss: !default should only be written once for each variable. This will be an error in Dart Sass 2.0.0. ╷ 79 │ $input-group-addon-bg: $gray-200 !default !default; │ ^^^^^^^^ ╵
-
You need to create the indices in mongodb if they are missing. You can do by running these commands in mongodb.
db.objects.createIndex({ _key: 1, score: -1 }, { background: true }); db.objects.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true }); db.objects.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0, background: true });
Without indices everything will be super slow.
-
I can do that but I would have thought the restore would have taken care of that.
There are still some things I have to click more than once but maybe it's because of the slowness.
Here are some of those but I'll run your commands and see what happens.DEPRECATION WARNING on line 116, column 63 of ../../node_modules/bootswatch/dist/solar/_variables.scss: !default should only be written once for each variable. This will be an error in Dart Sass 2.0.0. ╷ 116 │ $navbar-light-color: rgba($black, .4) !default !default; │ ^^^^^^^^ ╵ DEPRECATION WARNING on line 117, column 63 of ../../node_modules/bootswatch/dist/solar/_variables.scss: !default should only be written once for each variable. This will be an error in Dart Sass 2.0.0. ╷ 117 │ $navbar-light-active-color: rgba($black, .7) !default !default; │ ^^^^^^^^ ╵ 2023-05-18T20:10:27.404Z [4567/4281] - error: posts.accept Error: [[error:no-post]] at canEditQueue (/home/nodebun/nodebb/src/socket.io/posts.js:154:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async SocketPosts.accept (/home/nodebun/nodebb/src/socket.io/posts.js:103:2) at async onMessage (/home/nodebun/nodebb/src/socket.io/index.js:182:19) 2023-05-18T20:11:34.510Z [4567/4281] - error: posts.accept Error: [[error:no-post]] at canEditQueue (/home/nodebun/nodebb/src/socket.io/posts.js:154:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async SocketPosts.accept (/home/nodebun/nodebb/src/socket.io/posts.js:103:2) at async onMessage (/home/nodebun/nodebb/src/socket.io/index.js:182:19)
-
test> use nodebb switched to db nodebb nodebb> db.objects.createIndex({ _key: 1, score: -1 }, { background: true }); _key_1_score_-1 nodebb> db.objects.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true }); MongoServerError: Index build failed: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx: Collection nodebb.objects ( xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ) :: caused by :: E11000 duplicate key error collection: nodebb.objects index: _key_1_value_-1 dup key: { _key: "analyticsKeys", value: "uniquevisitors" } nodebb> db.objects.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0, background: true }); expireAt_1
-
Stop your forum and remove the offending keys until you can run the index create command.
db.objects.removeMany({_key: "analyticsKeys"});
Then try
db.objects.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true });
again. -
Ok, ran all four then ran build and restarted the board.
test> use nodebb switched to db nodebb nodebb> db.objects.removeMany({_key: "analyticsKeys"}); TypeError: db.objects.removeMany is not a function nodebb> db.objects.deleteMany({_key: "analyticsKeys"}); { acknowledged: true, deletedCount: 51 } nodebb> db.objects.createIndex({ _key: 1, score: -1 }, { background: true }); _key_1_score_-1 nodebb> db.objects.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true }); _key_1_value_-1 nodebb> db.objects.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0, background: true }); expireAt_1 nodebb> exit
It always complains about the questions plugin;
nodebun@nb01:~/nodebb$ ./nodebb build started 2023-05-18T22:32:11.596Z [4567/4717] - warn: [plugins] "nodebb-plugin-question-and-answer" is active but not installed. 2023-05-18T22:32:11.642Z [4567/4717] - info: [build] Building in parallel mode 2023-05-18T22:32:11.645Z [4567/4717] - info: [build] plugin static dirs build started 2023-05-18T22:32:11.647Z [4567/4717] - info: [build] requirejs modules build started 2023-05-18T22:32:11.648Z [4567/4717] - info: [build] client js bundle build started 2023-05-18T22:32:11.649Z [4567/4717] - info: [build] admin js bundle build started 2023-05-18T22:32:11.650Z [4567/4717] - info: [build] client side styles build started 2023-05-18T22:32:11.651Z [4567/4717] - info: [build] admin control panel styles build started 2023-05-18T22:32:11.652Z [4567/4717] - info: [build] templates build started 2023-05-18T22:32:11.653Z [4567/4717] - info: [build] languages build started 2023-05-18T22:32:12.335Z [4567/4717] - info: [build] plugin static dirs build completed in 0.69sec 2023-05-18T22:32:13.868Z [4567/4717] - info: [build] client js bundle build completed in 2.22sec 2023-05-18T22:32:13.868Z [4567/4717] - info: [build] admin js bundle build completed in 2.219sec 2023-05-18T22:32:22.318Z [4567/4717] - info: [build] client side styles build completed in 10.667sec 2023-05-18T22:32:23.079Z [4567/4717] - info: [build] admin control panel styles build completed in 11.427sec 2023-05-18T22:32:23.510Z [4567/4717] - info: [build] languages build completed in 11.857sec 2023-05-18T22:32:24.053Z [4567/4717] - info: [build] templates build completed in 12.401sec 2023-05-18T22:32:24.212Z [4567/4717] - info: [build] requirejs modules build completed in 12.565sec 2023-05-18T22:32:24.212Z [4567/4717] - info: [build] Bundling with Webpack. 2023-05-18T22:32:24.235Z [4567/4717] - warn: [plugins] "nodebb-plugin-question-and-answer" is active but not installed. 2023-05-18T22:32:46.180Z [4567/4717] - info: [build] Bundling took 18077 ms 2023-05-18T22:32:46.199Z [4567/4717] - info: [build] Asset compilation successful. Completed in 34.537sec.
However, I did install it when rebuilding the board.
$ history | grep question 63 npm install nodebb-plugin-question-and-answer 162 history | grep question
I've re-installed it and ran build again.
This time, no complaints so I started the board again.
Few complaints coming up but the board came up.DEPRECATION WARNING on line 68, column 52 of ../../node_modules/bootswatch/dist/flatly/_variables.scss: !default should only be written once for each variable. This will be an error in Dart Sass 2.0.0. ╷ 68 │ $nav-link-padding-y: .5rem !default !default; │ ^^^^^^^^ ╵ DEPRECATION WARNING on line 70, column 56 of ../../node_modules/bootswatch/dist/flatly/_variables.scss: !default should only be written once for each variable. This will be an error in Dart Sass 2.0.0. ╷ 70 │ $nav-link-disabled-color: $gray-600 !default !default; │ ^^^^^^^^ ╵ DEPRECATION WARNING on line 79, column 60 of ../../node_modules/bootswatch/dist/litera/_variables.scss: !default should only be written once for each variable. This will be an error in Dart Sass 2.0.0. ╷ 79 │ $input-group-addon-bg: $gray-200 !default !default; │ ^^^^^^^^ ╵
The errors keep showing up but the board is running now.
I'll test everything I can and see how it's going now. -
Is it too early to understand what happened? I can document all of the steps I took. Every time I goofed something up because I could not find enough documentation, I noted that and tried again so that eventually, I had all the steps needed. However, I still ended up with these problems.. maybe others?
-
You had 2 different problems .
Your package.json had a broken version for
request-promise-native
and you didn't have indices when you restored your database.Not sure how the first one happened but the missing indices happens when you only export the objects collection from mongodb. If you want to export the whole database you can use
mongodump --db <name_of_db>