Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Technical Support
  3. Error Loading Module './manage' in NodeBB Theme – Need Help Debugging

Error Loading Module './manage' in NodeBB Theme – Need Help Debugging

Scheduled Pinned Locked Moved Technical Support
4 Posts 2 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F This user is from outside of this forum
    F This user is from outside of this forum
    [email protected]
    wrote last edited by
    #1

    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.tpl

    Code Snippets:

    1. client/manage.js
      define('forum/community-manage', ['bootbox'], function (bootbox) {
      // ...
      });
    2. 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!
    1 Reply Last reply
    0
    • baris@community.nodebb.orgB This user is from outside of this forum
      baris@community.nodebb.orgB This user is from outside of this forum
      [email protected]
      wrote last edited by
      #2

      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.

      1 Reply Last reply
      2
      • F This user is from outside of this forum
        F This user is from outside of this forum
        [email protected]
        wrote last edited by
        #3

        Thank you. My mistake, I didn't check the questions organized by AI. However, the problem still exists after unifying the names.

        1 Reply Last reply
        0
        • baris@community.nodebb.orgB This user is from outside of this forum
          baris@community.nodebb.orgB This user is from outside of this forum
          [email protected]
          wrote last edited by
          #4

          How are you rendering the template? Is your code on github?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups