My admin panel is without CSS, how can I fix this?
-
Tried from two different browsers, but it doesn't load the CSS.
From the dev tools console I see it's failing to load assets/plugins/nodebb-plugin-markdown/styles/default.css and assets/plugins/nodebb-plugin-emoji/emoji/styles.css
I also get this other error:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'classList')
at new u (29933.1d011fada691fdad41a3.min.js:1:2360)
at admin.min.js?v=ajp8su09t30:1:15868
at admin.min.js?v=ajp8su09t30:1:16523As end result I see this:
From the user point of view instead everything is fine
What can I do?
-
Try the following commands run in the directory you installed NodeBB
./nodebb stop ./nodebb build ./nodebb start
Let us know if there are any errors when you execute those commands
-
Ah right, i had a script to build & run at the vm start (it's in a lxc dedicated vm) and i didn't see the errors
It says:
Error: Error: Can't find stylesheet to import. ╷ 1 │ @import "admin/overrides"; │ ^^^^^^^^^^^^^^^^^ ╵ - 1:9 root stylesheet at handleCompileResponse (/usr/src/app/node_modules/sass-embedded/dist/lib/src/compile.js:236:15) at compileRequestAsync (/usr/src/app/node_modules/sass-embedded/dist/lib/src/compile.js:118:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.buildCSS (/usr/src/app/src/meta/minifier.js:163:22) at async process.<anonymous> (/usr/src/app/src/meta/minifier.js:117:20) ERROR in ./build/public/src/admin/admin.js 85:2-33 Module not found: Error: Can't resolve 'material-design-lite' in '/usr/src/app/build/public/src/admin'
uhhhh i should have noticed this... i have a script at boot that download the latest from github but then deletes public and replaces with my backup... so it's my fault
thanks for the nodebb build hint, sorry i'm inexperienced but i wanted to automate too much....
-
@Gliding9426 Right, that error reads like you are using a custom theme? If you have no scss overrides in your theme, just create an empty
overrides.scss
file (see how Persona does it here) -
Looks like I also misconfigured the proxy server, /assets was pointing to an empty directory (it used to work until i moved it forgetting it was mentioned there)