docker compose - `Failed to lookup view! Did you run ./nodebb build?` error
-
@baris Yes
➜ devops git:(main) ✗ docker compose exec forum ls /usr/src/app/build active_plugins.json cache-buster public ➜ devops git:(main) ✗ docker compose exec forum ls /usr/src/app/build/public admin-rtl.css admin.css client-rtl.css client.css fontawesome language plugins scripts-admin.js scripts-client.js src templates ➜ devops git:(main) ✗
-
What about the template files inside
/usr/src/app/build/public/templates
? The error message you are seeing is caused when expressjs can't find the template file to render. -
@baris It looks like they are in place
➜ devops git:(main) ✗ docker compose exec forum ls /usr/src/app/build/public/templates 400.js 404.tpl admin confirm.js ip-blacklist.js outgoing.js register.js reset.tpl tos.js 400.tpl 500.js chat.js confirm.tpl ip-blacklist.tpl outgoing.tpl register.tpl reset_code.js tos.tpl 403.js 500.tpl chat.tpl emails login.js partials registerComplete.js reset_code.tpl unsubscribe.js 403.tpl 503.js chats.js flags login.tpl post-queue.js registerComplete.tpl sitemap.js unsubscribe.tpl 404.js 503.tpl chats.tpl install modals post-queue.tpl reset.js sitemap.tpl
-
Ok so it looks like you are missing the templates from the theme, this can happen if you don't have a theme activated. For example I don't see the
categories.tpl
file in your output. Make surenodebb-theme-harmony
is activated before./nodebb build
is run.ERROR in ./build/public/src/modules/topicThumbs.js 104:6-106:8 Module not found: Error: Can't resolve 'composer' in '/usr/src/app/build/public/src/modules'
Looks like nodebb-plugin-composer-default is also not activated.
-
@baris Thanks that helps:
docker compose exec forum /usr/src/app/nodebb activate nodebb-plugin-composer-default --config /opt/config/config.json docker compose exec forum /usr/src/app/nodebb activate nodebb-theme-harmony --config /opt/config/config.json
But this is a completely fresh install, shouldn't the forum boot from the as-is official docker image?
-
@baris i can't login :think:
There is no errors in the server log\browser devtools...added 2 packages, and audited 894 packages in 1s 117 packages are looking for funding run `npm fund` for details 1 moderate severity vulnerability Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. npm notice npm notice New major version of npm available! 10.9.2 -> 11.2.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.2.0 npm notice To update run: npm install -g npm@11.2.0 npm notice DEBUG: PACKAGE_MANAGER: npm DEBUG: CONFIG location: /opt/config/config.json DEBUG: START_BUILD: false No changes in package.json. Skipping build... > nodebb@4.2.0 start > node loader.js --config=/opt/config/config.json --no-silent --no-daemon NodeBB v4.2.0 Copyright (C) 2013-2025 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). 2025-03-22T18:54:35.811Z [4567/56] - info: Initializing NodeBB v4.2.0 http://localhost:4567 2025-03-22T18:54:36.409Z [4567/56] - info: [socket.io] Restricting access to origin: http://localhost:* 2025-03-22T18:54:36.443Z [4567/56] - info: [api] Adding 0 route(s) to `api/v3/plugins` 2025-03-22T18:54:36.448Z [4567/56] - info: [router] Routes added 2025-03-22T18:54:36.455Z [4567/56] - info: 🎉 NodeBB Ready 2025-03-22T18:54:36.456Z [4567/56] - info: 🤝 Enabling 'trust proxy' 2025-03-22T18:54:36.457Z [4567/56] - info: 📡 NodeBB is now listening on: 0.0.0.0:4567 2025-03-22T18:54:36.457Z [4567/56] - info: 🔗 Canonical URL: http://localhost:4567
-
When ./nodebb setup is executed it enables all the default plugins. Including harmony theme and composer default.
Not sure where that happens in the docker file :think: -
@baris Its actually in this bash file: https://github.com/NodeBB/NodeBB/blob/master/install/docker/entrypoint.sh
-
https://github.com/NodeBB/NodeBB/blob/master/install/docker/entrypoint.sh#L186-L188
Should i manually set the envSETUP
?
@baris Doesn't https://manage.nodebb.org uses container-based technology? -
@josef this is the part that should triggered the setup. We don't use docker on manage.nodebb.org.