Can't start NodeBB after switching theme

General Discussion
  • #1

    So after getting and installing my theme here I'm trying to start
    I can't run NodeBB, or get back in to switch my theme back.
    I also can't figure out what went wrong.

    Can I get a bit of help?

  • #2

    Alright, I figured out the error:
    [themes] Could not find base template files at: /root/nodebb/node_modules/nodebb-theme-vanilla/templates

    The thing is aqll the templates are there, and even when I copied the templete folder into my nodetendo theme it still said the same thing on ./nodebb log.

  • #3

    @CyanPrime ./nodebb reset themes Then ./nodebb startshould get your site back up.

  • #4

    Thank you very much, @a_5mith
    My forum is working again! 😺
    However, my custom theme still breaks NodeBB. Can anyone tell me why? I'd love to become a theme dev, but I can't really do that if my themes crash the BB 😞

  • #5

    @CyanPrime Check your nodebb-theme-vanilla files are exactly like this:, any changes you want to make, recreate the file in your new theme. Any file that doesn't exist in your theme will fallback to vanilla. Also make sure that you change all the package theme files etc. Use this for guidance

    Sidenote from looking at your github page, if you're pulling that theme as it is there, it will be installing in nodebb/node_modules/node_modules/nodebb-theme-nodetendo. Your root folder in github should be the theme, not node_modules. Your file structure should look like nodebb/node_modules/nodebb-theme-nodetendo, the base error is because your theme.less has ../ (go back one directory) which is still within your plugin. Hope that makes sense. Having said that, if you just pulled the git from nodebb root, it should install correctly. Hmm. I'll have a play with it.

  • #6

    Ok, I've got your theme working, you need to take the less folder, the theme.json and the theme.less, and put them in your root folder called nodebb-theme-nodetendo (before node_modules), delete the node_modules folder from your theme by running sudo rm -r -f node_modules (do this in your theme folder, not in nodebb, otherwise you'll only be adding to your issues.

    Your theme still won't work, as you need to actually define a few things, if you run ./nodebb dev you will see an error along the lines of brand-primary is undefined, you will need to create a variables.less file inside your less folder and define all your CSS. To start with, just copy the contents of less from vanilla and it should run fine. (Don't quote me on that, I'm not actually a theme developer.) 😆

    Image for reference, in my case nodebb has been renamed to a different folder name.


    Either way, now your theme is in the correct format, go to and look in the guide for theming. 👍

  • GNU/Linux

    Hey there @CyanPrime, can confirm as @a_5mith has recommended, the files in your repository should not be inside a node_modules folder. Just lay them out like they're laid out in vanilla/lavender.

  • #8

    Thank you all for your help. I got it working! It was actually a error in the tutorial that I managed to figure out.
    Here's a link to how I did it:

    And here is the erroring tutorial:

    Once again, thank you all. 😄

  • #9

    @CyanPrime not sure how that's fixed it as your route inside theme.less doesn't actually point to the vanilla template. For that file to point at vanilla, you'd be looking at ../../../nodebb-theme-vanilla, but if it works then, so be it. 😆

Suggested Topics

| | | |