Hello,
I'm trying unsuccessfully to install NodeBB on my VM.
I should point out that this is not my first installation.
I tested with NodeJS 14.x and 16.x
I scrupulously followed the official documentation for Debian. (https://docs.nodebb.org/installing/os/debian/)
Here is the detailled instalaltion commands CLI and error log :
apt install curl
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main" | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl start mongod
sudo systemctl status mongod
mongo
> use admin
> db.createUser( { user: "admin", pwd: "nodebb", roles: [ { role: "root", db: "admin" } ] } )
> use nodebb
> db.createUser( { user: "nodebb", pwd: "nodebb", roles: [ { role: "readWrite", db: "nodebb" }, { role: "clusterMonitor", db: "admin" } ] } )
> quit()
sudo nano /etc/mongod.conf
security:
authorization: enabled
sudo systemctl restart mongod
sudo apt-get install -y git
cd /home/nodebb
git clone -b v1.18.x https://github.com/NodeBB/NodeBB.git nodebb
cd nodebb
./nodebb setup
------------
[email protected]:~/nodebb$ ./nodebb setup
package.json not found.
Populating package.json...
OK
Dependencies outdated or not yet installed.
Installing them now...
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
added 615 packages, and audited 616 packages in 1m
44 packages are looking for funding
run `npm fund` for details
3 vulnerabilities (1 moderate, 2 high)
To address all issues possible, run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 8.3.1 -> 8.5.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.5.0
npm notice Run npm install -g [email protected] to update!
npm notice
OK
2022-02-17T16:38:58.779Z [3816] - info: NodeBB Setup Triggered via Command Line
Welcome to NodeBB v1.18.6!
This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
Press enter to accept the default setting (shown in brackets).
URL used to access this NodeBB (http://localhost:4567)
Please enter a NodeBB secret (11464eb1-280b-48a9-8c4e-01e2a5c61cc3)
Would you like to submit anonymous plugin usage to nbbpm? (yes)
Which database to use (mongo)
2022-02-17T16:39:16.633Z [3816] - info:
Now configuring mongo database:
MongoDB connection URI: (leave blank if you wish to specify host, port, username/password and database individually)
Format: mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
Host IP or address of your MongoDB instance (127.0.0.1)
Host port of your MongoDB instance (27017)
MongoDB username nodebb
Password of your MongoDB database
MongoDB database name (nodebb) nodebb
2022-02-17T16:39:45.101Z [3816] - info: [database] Checking database indices.
2022-02-17T16:39:45.131Z [3816] - info: [database] Checking database indices done!
2022-02-17T16:39:45.745Z [3816] - verbose: [minifier] utilizing a maximum of 3 additional threads
Configuration Saved OK
Populating database with default configs, if not already set...
2022-02-17T16:39:45.767Z [3816] - warn: [cache-buster] could not read cache buster ENOENT: no such file or directory, open '/home/nodebb/nodebb/build/cache-buster' {"code":"ENOENT","errno":-2,"path":"/home/nodebb/nodebb/build/cache-buster","stack":"Error: ENOENT: no such file or directory, open '/home/nodebb/nodebb/build/cache-buster'","syscall":"open"}
Enabling default theme: nodebb-theme-persona
No categories found, populating instance with default categories
2022-02-17T16:39:46.145Z [3816] - warn: No administrators have been detected, running initial user setup
Administrator username admin
Administrator email address [email protected]
Password
Confirm Password
Creating welcome post!
Enabling default plugins
2022-02-17T16:40:36.814Z [3816] - info: [install/defaultPlugins] customDefaults
2022-02-17T16:40:36.815Z [3816] - info: [install/enableDefaultPlugins] activating default plugins {"0":"nodebb-plugin-composer-default","1":"nodebb-plugin-markdown","2":"nodebb-plugin-mentions","3":"nodebb-widget-essentials","4":"nodebb-rewards-essentials","5":"nodebb-plugin-emoji","6":"nodebb-plugin-emoji-android"}
Parsing upgrade scripts...
OK | 110 script(s) found
→ [2015/12/15] Upgrading chats... skipped
→ [2015/12/23] Chat room hashes... skipped
→ [2015/12/23] Adding theme to active plugins sorted set... skipped
→ [2016/1/14] Creating user best post sorted sets... skipped
→ [2016/1/20] Creating users:notvalidated... skipped
→ [2016/1/23] Creating Global moderators group... skipped
→ [2016/2/25] Social: Post Sharing... skipped
→ [2016/4/14] Group title from settings to user profile... skipped
→ [2016/4/19] Users post count per tid... skipped
→ [2016/4/29] Dismiss flags from deleted topics... skipped
→ [2016/5/28] Giving topics:read privs to any group/user that was previously allowed to Find & Access Category... skipped
→ [2016/6/13] Store upvotes/downvotes separately... skipped
→ [2016/7/12] Giving upload privileges... skipped
→ [2016/8/5] Removing best posts with negative scores... skipped
→ [2016/8/7] Granting edit/delete/delete topic on existing categories... skipped
→ [2016/9/22] Category recent tids... skipped
→ [2016/10/8] Favourites to Bookmarks... skipped
→ [2016/10/14] Sorted sets for post replies... skipped
→ [2016/11/22] Update global and user language keys... skipped
→ [2016/11/25] Sorted set for pinned topics... skipped
→ [2017/2/25] Update global and user sound settings... skipped
→ [2017/2/28] Upgrading config urls to use assets route... skipped
→ [2017/4/16] Delete accidentally long-lived sessions... skipped
→ [2016/12/7] Migrating flags to new schema... skipped
→ [2017/2/27] New sorted set posts:votes... skipped
→ [2017/3/22] Update moderation notes to zset... skipped
→ [2017/4/14] Set default allowed file extensions... skipped
→ [2017/4/26] Remove relative_path from uploaded profile cover urls... skipped
→ [2017/5/26] rename user mod privileges group... skipped
→ [2017/6/16] Give tag privilege to registered-users on all categories... skipped
→ [2017/7/5] Wipe all existing RSS tokens... skipped
→ [2017/7/10] Fix incorrect robots.txt schema... skipped
→ [2017/7/17] Generate email logo for use in email header... skipped
→ [2017/9/6] Clearing stale digest templates that were accidentally saved as custom... skipped
→ [2017/9/7] Changing ip blacklist storage to object... skipped
→ [2017/10/30] New sorted set cid:<cid>:tids:lastposttime... skipped
→ [2017/10/12] Generate customHTML block from old customJS setting... skipped
→ [2017/11/15] Convert old notification digest settings... skipped
→ [2017/12/8] Add votes to topics... skipped
→ [2017/12/18] Change the schema of simple keys so they don't use value field (mongodb only)... skipped
→ [2017/12/18] Give chat privilege to registered-users... skipped
→ [2018/1/3] Give upload privilege to registered-users globally if it is given on a category... skipped
→ [2018/1/8] Fix sort by votes for moved topics... skipped
→ [2018/1/9] Give vote privilege to registered-users on all categories... skipped
→ [2018/1/12] Rename privileges:downvote and privileges:flag to min:rep:downvote, min:rep:flag respectively... skipped
→ [2018/1/22] Fix topics in categories per user if they were moved... skipped
→ [2018/2/14] Add default settings for notification delivery types... skipped
→ [2018/2/17] Flatten navigation data... skipped
→ [2018/2/21] Revising minimum password strength to 1 (from 0)... skipped
→ [2018/1/31] Give category access privileges to spiders system group... skipped
→ [2018/2/28] Give registered users signature privilege... skipped
→ [2018/3/15] Reformatting post diffs to be stored in lists and hash instead of single zset... skipped
→ [2018/4/16] Refresh post-upload associations... skipped
→ [2018/5/28] Give global search privileges... skipped
→ [2018/6/7] Give post history viewing privilege to registered-users on all categories... skipped
→ [2018/6/8] Give deleted post viewing privilege to moderators on all categories... skipped
→ [2018/6/22] Hash all IP addresses stored in Recent IPs zset... skipped
→ [2018/8/28] Record first entry in username/email history... skipped
→ [2018/9/24] Upgrade bans to hashes... skipped
→ [2018/9/28] Give global local login privileges... skipped
→ [2018/10/1] Optimize PostgreSQL sessions... skipped
→ [2018/10/4] add filters to events... skipped
→ [2018/10/10] Fix category post zsets... skipped
→ [2018/10/11] Fix category topic zsets... skipped
→ [2018/10/24] Rename maximumImageWidth to resizeImageWidth... skipped
→ [2018/11/10] Navigation item visibility groups... skipped
→ [2018/11/10] Widget visibility groups... skipped
→ [2018/12/11] Remove uid:<uid>:ignored:cids... skipped
→ [2018/12/13] Update category watch data... skipped
→ [2019/1/4] Group create global privilege... skipped
→ [2019/1/5] Global view privileges... skipped
→ [2019/3/16] Calculate image sizes of all uploaded images... skipped
→ [2019/3/25] Delete username email history for deleted users... skipped
→ [2019/4/5] Update moderation notes to hashes... skipped
→ [2019/5/21] Disable plugin metrics for existing installs... skipped
→ [2019/5/28] Give mods explicit privileges... skipped
→ [2019/6/4] Update registration type... skipped
→ [2019/6/23] Create zsets for user posts per category... skipped
→ [2019/10/8] give mod info privilege... skipped
→ [2019/9/24] Clean flag byCid zsets... skipped
→ [2019/10/7] Clean up post hash data... skipped
→ [2019/10/7] Clean up old notifications and hash data... skipped
→ [2020/5/2] Fix user sorted sets... skipped
→ [2020/5/21] Removing file upload privilege if file uploads were disabled (`allowFileUploads`)... skipped
→ [2020/6/9] Remove duplicate image field for categories... skipped
→ [2020/6/26] Unescape navigation titles... skipped
→ [2018/10/11] Re-add deleted topics to topics:recent... skipped
→ [2020/7/15] New sorted set for tracking flags by target... skipped
→ [2020/7/16] Consolidate multiple flags reports, going forward... skipped
→ [2020/7/31] Remove flag reporters sorted set... skipped
→ [2020/8/22] Add target uid to flag objects... skipped
→ [2020/9/6] Disable nodebb-plugin-soundpack-default... skipped
→ [2020/9/6] Remove allow from uri setting... skipped
→ [2020/9/11] Create fullname search set... skipped
→ [2020/10/11] Fix category colors that are 3 digit hex colors... skipped
→ [2020/10/13] Create verified/unverified user groups... skipped
→ [2020/10/24] Store poster count in topic hash... skipped
→ [2020/11/26] Clear purged replies and toPid... skipped
→ [2020/11/23] Create category tags sorted sets... skipped
→ [2020/12/11] Migrate existing topic thumbnails to new format... skipped
→ [2020/12/13] Move banned users to banned-users group... skipped
→ [2021/1/27] Create category name sorted set... skipped
→ [2021/1/31] Create subCategoriesPerPage property for categories... skipped
→ [2021/2/7] Store number of thumbs a topic has in the topic object... skipped
→ [2021/3/9] Store default favicon if it does not exist... skipped
→ [2021/3/11] Add "schedule" to default privileges of admins and gmods for existing categories... skipped
→ [2021/6/18] Enable setting to include unverified emails for all mailings... skipped
→ [2021/9/9] Store tags in topic hash... skipped
→ [2021/9/28] Category topics sorted sets by views... skipped
→ [2021/11/2] Delete mentions:sent:<pid> sorted sets... skipped
Schema update complete!
2022-02-17T16:40:36.973Z [3816] - verbose: [build] Querying CPU core count for build strategy
2022-02-17T16:40:36.973Z [3816] - verbose: [build] System returned 4 cores, opting for parallel build strategy
2022-02-17T16:40:36.974Z [3816] - verbose: [build] building the following targets: plugin static dirs, requirejs modules, client js bundle, admin js bundle, client side styles, admin control panel styles, templates, languages
started
2022-02-17T16:40:36.995Z [3816] - verbose: [plugins] loading the following fields from plugin data: staticDirs, modules, clientScripts, acpScripts, cssFiles, lessFiles, acpLessFiles, languageData
2022-02-17T16:40:37.000Z [3816] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-composer-default
2022-02-17T16:40:37.001Z [3816] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-markdown
2022-02-17T16:40:37.001Z [3816] - verbose: [plugins] Found 1 css file(s) for plugin nodebb-widget-essentials
2022-02-17T16:40:37.002Z [3816] - verbose: [plugins] Found 1 less file(s) for plugin nodebb-plugin-emoji
2022-02-17T16:40:37.002Z [3816] - verbose: [plugins] Found 1 acpLess file(s) for plugin nodebb-plugin-emoji
2022-02-17T16:40:37.003Z [3816] - verbose: [plugins] Found 11 AMD-style module(s) for plugin nodebb-plugin-composer-default
2022-02-17T16:40:37.003Z [3816] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-composer-default
2022-02-17T16:40:37.003Z [3816] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-theme-persona
2022-02-17T16:40:37.005Z [3816] - verbose: [plugins] found 2 static directories for nodebb-plugin-markdown
2022-02-17T16:40:37.005Z [3816] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-markdown
2022-02-17T16:40:37.005Z [3816] - verbose: [plugins] Found 2 AMD-style module(s) for plugin nodebb-plugin-markdown
2022-02-17T16:40:37.005Z [3816] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-markdown
2022-02-17T16:40:37.005Z [3816] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-mentions
2022-02-17T16:40:37.005Z [3816] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-mentions
2022-02-17T16:40:37.006Z [3816] - verbose: [plugins] found 1 static directories for nodebb-rewards-essentials
2022-02-17T16:40:37.006Z [3816] - verbose: [plugins] found 1 static directories for nodebb-plugin-emoji
2022-02-17T16:40:37.007Z [3816] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-rewards-essentials
2022-02-17T16:40:37.007Z [3816] - verbose: [plugins] Found 3 AMD-style module(s) for plugin nodebb-plugin-emoji
2022-02-17T16:40:37.007Z [3816] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-emoji
2022-02-17T16:40:37.007Z [3816] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-emoji
2022-02-17T16:40:37.009Z [3816] - verbose: [plugins] Found 1 AMD-style module(s) for plugin nodebb-theme-persona
2022-02-17T16:40:37.009Z [3816] - verbose: [plugins] Found 3 js file(s) for plugin nodebb-theme-persona
2022-02-17T16:40:37.011Z [3816] - verbose: [plugins] Found 2 js file(s) for plugin nodebb-plugin-composer-default
2022-02-17T16:40:37.014Z [3816] - info: [build] Building in parallel mode
2022-02-17T16:40:37.015Z [3816] - info: [build] plugin static dirs build started
2022-02-17T16:40:37.017Z [3816] - info: [build] requirejs modules build started
2022-02-17T16:40:37.018Z [3816] - info: [build] client js bundle build started
2022-02-17T16:40:37.040Z [3816] - info: [build] admin js bundle build started
2022-02-17T16:40:37.041Z [3816] - info: [build] client side styles build started
2022-02-17T16:40:37.041Z [3816] - info: [build] admin control panel styles build started
2022-02-17T16:40:37.041Z [3816] - info: [build] templates build started
2022-02-17T16:40:37.042Z [3816] - info: [build] languages build started
2022-02-17T16:40:40.386Z [3816] - info: [build] plugin static dirs build completed in 3.371sec
2022-02-17T16:40:40.419Z [3816] - info: [build] admin js bundle build completed in 3.379sec
2022-02-17T16:40:42.576Z [3816] - info: [build] client js bundle build completed in 5.558sec
2022-02-17T16:40:45.111Z [3816] - info: [build] client side styles build completed in 8.07sec
2022-02-17T16:40:45.198Z [3816] - info: [build] admin control panel styles build completed in 8.157sec
2022-02-17T16:40:47.465Z [3816] - info: [build] languages build completed in 10.423sec
2022-02-17T16:40:48.337Z [3816] - info: [build] requirejs modules build completed in 11.32sec
2022-02-17T16:40:48.488Z [3816] - verbose: [meta/templates] Successfully compiled templates.
2022-02-17T16:40:48.488Z [3816] - info: [build] templates build completed in 11.447sec
2022-02-17T16:40:48.490Z [3816] - info: [build] Asset compilation successful. Completed in 11.474sec.
===================================================================================================================================================================================================================================
NodeBB Setup Completed. Run "./nodebb start" to manually start your NodeBB server.
[email protected]:~/nodebb$
--------------
[email protected]:~/nodebb$ ./nodebb start
Starting NodeBB
"./nodebb stop" to stop the NodeBB server
"./nodebb log" to view server output
"./nodebb help" for more commands
--------------
[email protected]:~/nodebb$ ./nodebb log
Hit Ctrl-C to exit
at async Plugins.reloadRoutes (/home/nodebb/nodebb/src/plugins/index.js:140:2)
at async module.exports (/home/nodebb/nodebb/src/routes/index.js:143:2)
at async initializeNodeBB (/home/nodebb/nodebb/src/webserver.js:105:2)
at async exports.listen (/home/nodebb/nodebb/src/webserver.js:83:2)
at async Object.start.start (/home/nodebb/nodebb/src/start.js:45:3)
2022-02-17T16:42:01.788Z [4567/4014] - info: [api] Adding 0 route(s) to `api/v3/plugins`
2022-02-17T16:42:01.794Z [4567/4014] - info: [router] Routes added
2022-02-17T16:42:01.799Z [4567/4014] - info: NodeBB Ready
2022-02-17T16:42:01.800Z [4567/4014] - info: Enabling 'trust proxy'
2022-02-17T16:42:01.801Z [4567/4014] - info: NodeBB is now listening on: 0.0.0.0:4567
2022-02-17T16:42:38.626Z [4567/4014] - error: [emoji] Failed to retrieve data for parse ENOENT: no such file or directory, open '/home/nodebb/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json' {"code":"ENOENT","errno":-2,"path":"/home/nodebb/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json","stack":"Error: ENOENT: no such file or directory, open '/home/nodebb/nodebb/node_modules/nodebb-plugin-emoji/build/emoji/table.json'","syscall":"open"}
2022-02-17T16:42:38.636Z [4567/4014] - error: /
TypeError: Cannot read properties of undefined (reading 'startsWith')
at Object.getBaseUrl (/home/nodebb/nodebb/node_modules/nodebb-plugin-emoji/build/lib/base-url.js:7:25)
at Object.addStylesheet [as method] (/home/nodebb/nodebb/node_modules/nodebb-plugin-emoji/build/lib/index.js:75:32)
at fireMethod (/home/nodebb/nodebb/src/plugins/hooks.js:137:25)
at Object.fireFilterHook [as filter] (/home/nodebb/nodebb/src/plugins/hooks.js:168:18)
at async Hooks.fire (/home/nodebb/nodebb/src/plugins/hooks.js:105:17)
at async Promise.all (index 1)
at async Tags.parse (/home/nodebb/nodebb/src/meta/tags.js:146:18)
at async renderMethod (/home/nodebb/nodebb/src/middleware/render.js:49:12)
at async ServerResponse.renderOverride [as render] (/home/nodebb/nodebb/src/middleware/render.js:92:5)
TypeError: Cannot read properties of undefined (reading 'startsWith')
at Object.getBaseUrl (/home/nodebb/nodebb/node_modules/nodebb-plugin-emoji/build/lib/base-url.js:7:25)
at Object.addStylesheet [as method] (/home/nodebb/nodebb/node_modules/nodebb-plugin-emoji/build/lib/index.js:75:32)
at fireMethod (/home/nodebb/nodebb/src/plugins/hooks.js:137:25)
at Object.fireFilterHook [as filter] (/home/nodebb/nodebb/src/plugins/hooks.js:168:18)
at async Hooks.fire (/home/nodebb/nodebb/src/plugins/hooks.js:105:17)
at async Promise.all (index 1)
at async Tags.parse (/home/nodebb/nodebb/src/meta/tags.js:146:18)
at async renderMethod (/home/nodebb/nodebb/src/middleware/render.js:49:12)
at async ServerResponse.renderOverride [as render] (/home/nodebb/nodebb/src/middleware/render.js:92:5)