This should be fixed in [email protected]
Custom themes and the npm registry
-
Reading the Creating a new NodeBB theme article, it says all themes must be installed via npm:
npm install nodebb-theme-mytheme
Must my theme be in the npm registry or can I install it another way?
-
you can have your theme as a folder or tarball aswell. just use
npm install tarball
ornpm install folder
you dont need to put it online -
@belstgut Thanks. If installing the folder, should I run that command from inside the folder? For example:
cd /path/to/nodebb/node_modules/folder npm install folder
-
to install the package, see here: https://docs.npmjs.com/cli/install
-
@belstgut brilliant, thanks for the link. V helpful.
-
@henrywright you can just copy your theme folder to node_modules directory. you don't have to run any commands.
-
@pichalite when I did that I found that my theme worked but was buggy (which probably indicates problems with my theme rather than the install process).
-
@pichalite @henrywright Do what I do
Go to theme,
npm link
, go to forum,npm link nodebb-theme-mytheme
Might need sudo for the first command...
-
@julian sorry for being dumb, does that mean these steps?
cd /path/to/nodebb-theme-mytheme npm link cd /path/to/nodebb npm link nodebb-theme-mytheme