Error Loading Module './manage' in NodeBB Theme – Need Help Debugging
Uncategorized
3
Beiträge
2
Kommentatoren
1
Aufrufe
-
I’m encountering an error when trying to load manage.js in my NodeBB theme. The error message says:
error loading forum/manage
Error: Cannot find module './manage'
Directory Structure & Code:
nodebb-theme-mine
├── client
│ └── manage.js
├── plugin.json
└── templates
└── manage.tplCode Snippets:
- client/manage.js
define('forum/community-manage', ['bootbox'], function (bootbox) {
// ...
}); - plugin.json(partial):
"modules": {
"../admin/plugins/harmony.js": "public/admin.js",
"../client/account/theme.js": "public/settings.js",
"forum/community-manage": "client/manage.js"
}
What I’ve Tried:
• Verified the file client/manage.js exists.
• Checked plugin.json syntax and module mappings.
Questions:
• Why is NodeBB unable to resolve ./manage when the module is defined in plugin.json?
• Could this be a path resolution issue or a problem with the AMD module syntax (define)?
Any help or pointers would be greatly appreciated!
- client/manage.js
-
S support@community.nodebb.org shared this topic
-
NodeBB tries to import a module based on the name of the template, so in your case your template is named
manage.tpl
so you should change the "modules" block to"modules": { "../admin/plugins/harmony.js": "public/admin.js", "../client/account/theme.js": "public/settings.js", "../client/manage.js": "client/manage.js" }
Or you can rename the template to
community-manage.tpl
then nodebb will try to load a js file named community-manage.js. -
Thank you. My mistake, I didn't check the questions organized by AI. However, the problem still exists after unifying the names.