Skip to content

Custom Page - nodebb

Solved Customisation
13 2 132
  • Hi I am trying to create a custom page called GameTracker. I head to Navigation and add a custom route. Do i type /gametracker or gametracket.tpl in the route. ? To be honest none of them work. When I go to extend/widgets I do not see the template. I have uninstalled and reinstalled but with same problem. Nothing in logs what I can see. What am I doing wrong. I did this in the past no worries. Many of these older plugins to not install at all for me in the ACP. I get a huge error. Now I cannot even uninstall it without error.

    Screenshot 2026-03-14 120142.png

    I tried to gove nodebb the benefit of the doubt. I had new OS install, new mongo blah blah blah but soon as I touch this nodebb its a nightmare lol.

    I also did not have this below on my page. Maybe thats an older version. Someone was mentioning this here in Sudonix some time ago.

    575a537c-21e0-4d39-921c-25b9653a7748-image.png

  • If you’re running the latest NodeBB version, then Node 21 and npm 10 are normally fine. Your error is most likely caused by a legacy dependency left over from an older install or from a plugin (probably something pulling grunt 0.3.x).

    Modern NodeBB versions should not depend on old Grunt packages anymore, so something in your dependency tree is outdated.


    What is probably happening

    You likely have:

    • Latest NodeBB ✅
    • Modern Node/npm ✅
    • Old dependency still present ❌

    Usually caused by:

    • an old plugin
    • an upgrade from an older NodeBB version
    • a package.json that was never fully cleaned

    Recommended clean fix

    Do a clean reinstall of dependencies:

    cd ~/nodebb
    rm -rf node_modules
    rm package-lock.json
    npm cache clean --force
    npm install
    

    If it still fails

    Try:

    npm install --legacy-peer-deps
    

    This is sometimes necessary when plugins have outdated peer dependencies.

    Also check your installed plugins

    Run:

    ./nodebb plugins
    

    Often the issue comes from an outdated plugin (possibly nodebb-plugin-iframely since you were uninstalling it or other.

    Reliable NodeBB admin fix procedure

    A typical safe rebuild process:

    ./nodebb stop
    rm -rf node_modules package-lock.json
    npm install --legacy-peer-deps
    ./nodebb build
    ./nodebb start
    

    if the problems persist maybe open a thread at nodebb communauty

    @DownPW Sorry for late reply. But, thank you so much. All is working ok again 🙂

    cd ~/nodebb
    rm -rf node_modules
    rm package-lock.json
    npm cache clean --force
    npm install
    

    This worked perfectly. Much appreciated your help.

  • Personally, I don’t use custom routes in navigation. I put the link in a classic HTML href to access the page in an HTML menu of the BrandHeader, then I use the widget to generate the HTML for the page itself.

    c8a4b371-fa0c-406e-90c9-64326de74789-image.jpeg

    a539e2bd-d964-4992-a916-10cac929d2a0-image.jpeg

    Seems you have problem with npm for uninstall the plugin in your screeshot

  • Hi, thx for the reply. I managed to get the page up now. But still have a problem when trying to uninstall anything.

    This is all a clean install.

  • What is the error when you uninstall in nodebb log ?

  • What is the error when you uninstall in nodebb log ?

    @DownPW

    npm resolution error report

    While resolving: grunt-contrib-watch@0.4.4
    Found: grunt@0.3.17
    node_modules/grunt
    dev grunt@“^0.3.17” from the root project

    Could not resolve dependency:
    peer grunt@“~0.4.0” from grunt-contrib-watch@0.4.4
    node_modules/grunt-contrib-watch
    dev grunt-contrib-watch@“^0.4.4” from the root project

    Conflicting peer dependency: grunt@0.4.5
    node_modules/grunt
    peer grunt@“~0.4.0” from grunt-contrib-watch@0.4.4
    node_modules/grunt-contrib-watch
    dev grunt-contrib-watch@“^0.4.4” from the root project

    Fix the upstream dependency conflict, or retry
    this command with --force or --legacy-peer-deps
    to accept an incorrect (and potentially broken) dependency resolution.

  • What is the error when you uninstall in nodebb log ?

    @DownPW

    The debug.

    0 verbose cli /home/smiley/.nvm/versions/node/v21.7.3/bin/node /home/smiley/.nvm/versions/node/v21.7.3/bin/npm
    1 info using npm@10.9.1
    2 info using node@v21.7.3
    3 silly config load:file:/home/smiley/.nvm/versions/node/v21.7.3/lib/node_modules/npm/npmrc
    4 silly config load:file:/home/smiley/nodebb/.npmrc
    5 silly config load:file:/home/smiley/.npmrc
    6 silly config load:file:/home/smiley/.nvm/versions/node/v21.7.3/etc/npmrc
    7 verbose title npm uninstall nodebb-plugin-iframely
    8 verbose argv “uninstall” “nodebb-plugin-iframely” “–save”
    9 verbose logfile logs-max:10 dir:/home/smiley/.npm/_logs/2026-03-15T10_02_42_147Z-
    10 verbose logfile /home/smiley/.npm/_logs/2026-03-15T10_02_42_147Z-debug-0.log
    11 silly logfile start cleaning logs, removing 1 files
    12 silly logfile done cleaning log files
    13 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
    14 silly idealTree buildDeps
    15 silly fetch manifest grunt@~0.4.0
    16 silly packumentCache full:https://registry.npmjs.org/grunt cache-miss
    17 http fetch GET 200 https://registry.npmjs.org/grunt 1238ms (cache revalidated)
    18 silly packumentCache full:https://registry.npmjs.org/grunt set size:169561 disposed:false
    19 verbose stack Error: could not resolve
    19 verbose stack at PlaceDep.failPeerConflict (/home/smiley/.nvm/versions/node/v21.7.3/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:503:25)
    19 verbose stack at new PlaceDep (/home/smiley/.nvm/versions/node/v21.7.3/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:157:21)
    19 verbose stack at #buildDepStep (/home/smiley/.nvm/versions/node/v21.7.3/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:920:18)
    19 verbose stack at async Arborist.buildIdealTree (/home/smiley/.nvm/versions/node/v21.7.3/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:181:7)
    19 verbose stack at async Promise.all (index 1)
    19 verbose stack at async Arborist.reify (/home/smiley/.nvm/versions/node/v21.7.3/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:131:5)
    19 verbose stack at async Uninstall.exec (/home/smiley/.nvm/versions/node/v21.7.3/lib/node_modules/npm/lib/commands/uninstall.js:51:5)
    19 verbose stack at async Npm.exec (/home/smiley/.nvm/versions/node/v21.7.3/lib/node_modules/npm/lib/npm.js:207:9)
    19 verbose stack at async module.exports (/home/smiley/.nvm/versions/node/v21.7.3/lib/node_modules/npm/lib/cli/entry.js:74:5)
    20 error code ERESOLVE
    21 error ERESOLVE could not resolve
    22 error
    23 error While resolving: grunt-contrib-watch@0.4.4
    23 error Found: grunt@0.3.17
    23 error node_modules/grunt
    23 error dev grunt@“^0.3.17” from the root project
    23 error
    23 error Could not resolve dependency:
    23 error peer grunt@“~0.4.0” from grunt-contrib-watch@0.4.4
    23 error node_modules/grunt-contrib-watch
    23 error dev grunt-contrib-watch@“^0.4.4” from the root project
    23 error
    23 error Conflicting peer dependency: grunt@0.4.5
    23 error node_modules/grunt
    23 error peer grunt@“~0.4.0” from grunt-contrib-watch@0.4.4
    23 error node_modules/grunt-contrib-watch
    23 error dev grunt-contrib-watch@“^0.4.4” from the root project
    23 error
    23 error Fix the upstream dependency conflict, or retry
    23 error this command with --force or --legacy-peer-deps
    23 error to accept an incorrect (and potentially broken) dependency resolution.
    24 error
    24 error
    24 error For a full report see:
    24 error /home/smiley/.npm/_logs/2026-03-15T10_02_42_147Z-eresolve-report.txt
    25 silly unfinished npm timer reify 1773568962435
    26 silly unfinished npm timer reify:loadTrees 1773568962435
    27 silly unfinished npm timer idealTree:buildDeps 1773568963186
    28 silly unfinished npm timer idealTree:node_modules/grunt-contrib-watch 1773568963198
    29 verbose cwd /home/smiley/nodebb
    30 verbose os Linux 6.0.12-76060012-generic
    31 verbose node v21.7.3
    32 verbose npm v10.9.1
    33 verbose exit 1
    34 verbose code 1
    35 error A complete log of this run can be found in: /home/smiley/.npm/_logs/2026-03-15T10_02_42_147Z-debug-0.log

  • Which version of NodeBB do you have?

    It doesn’t look like it’s recent, does it?

    This error is caused by a Grunt version conflict.

    It seems yiu currently uses grunt 0.3.17, but grunt-contrib-watch 0.4.4 requires grunt ~0.4.0. Modern npm versions (7+) are stricter with peer dependencies and will refuse to install conflicting versions.

    have you try to bypass the error (common with old NodeBB installs):

    npm install --legacy-peer-deps
    

    or in your case:

    npm uninstall nodebb-plugin-iframely --legacy-peer-deps
    

    Maybe @phenomlab can help too

  • Which version of NodeBB do you have?

    It doesn’t look like it’s recent, does it?

    This error is caused by a Grunt version conflict.

    It seems yiu currently uses grunt 0.3.17, but grunt-contrib-watch 0.4.4 requires grunt ~0.4.0. Modern npm versions (7+) are stricter with peer dependencies and will refuse to install conflicting versions.

    have you try to bypass the error (common with old NodeBB installs):

    npm install --legacy-peer-deps
    

    or in your case:

    npm uninstall nodebb-plugin-iframely --legacy-peer-deps
    

    Maybe @phenomlab can help too

    @DownPW

    npm install --legacy-peer-deps
    

    I have tried already and still did not want to work.

    npm uninstall nodebb-plugin-iframely --legacy-peer-deps
    

    this got rid of iframely though.

  • DownPW said:

    Which version of NodeBB do you have?

    It doesn’t look like it’s recent, does it?

    This error is caused by a Grunt version conflict.

    It seems yiu currently uses grunt 0.3.17, but grunt-contrib-watch 0.4.4 requires grunt ~0.4.0. Modern npm versions (7+) are stricter with peer dependencies and will refuse to install conflicting versions.

  • DownPW said:

    Which version of NodeBB do you have?

    It doesn’t look like it’s recent, does it?

    This error is caused by a Grunt version conflict.

    It seems yiu currently uses grunt 0.3.17, but grunt-contrib-watch 0.4.4 requires grunt ~0.4.0. Modern npm versions (7+) are stricter with peer dependencies and will refuse to install conflicting versions.

    @DownPW

    Latest version of nodebb. Fresh install.

    node is 21.7.3

    npm is 10.9.1

  • If you’re running the latest NodeBB version, then Node 21 and npm 10 are normally fine. Your error is most likely caused by a legacy dependency left over from an older install or from a plugin (probably something pulling grunt 0.3.x).

    Modern NodeBB versions should not depend on old Grunt packages anymore, so something in your dependency tree is outdated.


    What is probably happening

    You likely have:

    • Latest NodeBB ✅
    • Modern Node/npm ✅
    • Old dependency still present ❌

    Usually caused by:

    • an old plugin
    • an upgrade from an older NodeBB version
    • a package.json that was never fully cleaned

    Recommended clean fix

    Do a clean reinstall of dependencies:

    cd ~/nodebb
    rm -rf node_modules
    rm package-lock.json
    npm cache clean --force
    npm install
    

    If it still fails

    Try:

    npm install --legacy-peer-deps
    

    This is sometimes necessary when plugins have outdated peer dependencies.

    Also check your installed plugins

    Run:

    ./nodebb plugins
    

    Often the issue comes from an outdated plugin (possibly nodebb-plugin-iframely since you were uninstalling it or other.

    Reliable NodeBB admin fix procedure

    A typical safe rebuild process:

    ./nodebb stop
    rm -rf node_modules package-lock.json
    npm install --legacy-peer-deps
    ./nodebb build
    ./nodebb start
    

    if the problems persist maybe open a thread at nodebb communauty

  • If you’re running the latest NodeBB version, then Node 21 and npm 10 are normally fine. Your error is most likely caused by a legacy dependency left over from an older install or from a plugin (probably something pulling grunt 0.3.x).

    Modern NodeBB versions should not depend on old Grunt packages anymore, so something in your dependency tree is outdated.


    What is probably happening

    You likely have:

    • Latest NodeBB ✅
    • Modern Node/npm ✅
    • Old dependency still present ❌

    Usually caused by:

    • an old plugin
    • an upgrade from an older NodeBB version
    • a package.json that was never fully cleaned

    Recommended clean fix

    Do a clean reinstall of dependencies:

    cd ~/nodebb
    rm -rf node_modules
    rm package-lock.json
    npm cache clean --force
    npm install
    

    If it still fails

    Try:

    npm install --legacy-peer-deps
    

    This is sometimes necessary when plugins have outdated peer dependencies.

    Also check your installed plugins

    Run:

    ./nodebb plugins
    

    Often the issue comes from an outdated plugin (possibly nodebb-plugin-iframely since you were uninstalling it or other.

    Reliable NodeBB admin fix procedure

    A typical safe rebuild process:

    ./nodebb stop
    rm -rf node_modules package-lock.json
    npm install --legacy-peer-deps
    ./nodebb build
    ./nodebb start
    

    if the problems persist maybe open a thread at nodebb communauty

    @DownPW Sorry for late reply. But, thank you so much. All is working ok again 🙂

    cd ~/nodebb
    rm -rf node_modules
    rm package-lock.json
    npm cache clean --force
    npm install
    

    This worked perfectly. Much appreciated your help.

  • Sampo2910undefined Sampo2910 has marked this topic as solved
  • I’m happy to see this 🙂


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • 2 Votes
    6 Posts
    1k Views
    @dave1904 I’d start by adding a console.log function to hookData so you can see what is being returned return hookData; console.log(hookData):
  • NodeBB: Privileges for the Announcement channel

    Solved Configure nodebb
    6
    1
    1 Votes
    6 Posts
    1k Views
    Up to you really
  • Custom badges

    Solved Customisation nodebb
    103
    2
    49 Votes
    103 Posts
    26k Views
    Perfect
  • Forum Icons NodeBB

    Solved Customisation icons forum nodebb
    13
    0 Votes
    13 Posts
    2k Views
    @cagatay That matches what I see [image: 1667218162107-4f0f858d-9812-42b1-9f61-ffb13d31dccd-image.png]
  • How to downgrade plugin version on NodeBB

    Solved Customisation downgrade nodebb
    11
    3 Votes
    11 Posts
    2k Views
    @cagatay no problems
  • Rotating homepage icons, gifs?

    Solved Configure nodebb
    2
    3 Votes
    2 Posts
    714 Views
    @eveh It’s not a GIF, no. It’s actually a webp file so made much smaller, and uses keyframes to control the rotation on hover. You can easily make your own though The CSS for that is as below @keyframes rotate180 { from { transform: rotate(0deg); } to { transform: rotate(180deg); } } @keyframes rotate0 { from { transform: rotate(180deg); } to { transform: rotate(0deg); } } Your milage may vary on the CSS below, as it’s custom for Sudonix, but this is the class that is used to control the rotate .header .forum-logo, img.forum-logo.head { max-height: 50px; width: auto; height: 30px; margin-top: 9px; max-width: 150px; min-width: 32px; display: inline-block; animation-name: rotate180, rotate0; animation-duration: 1000ms; animation-delay: 0s, 1000ms; animation-iteration-count: 1; animation-timing-function: linear; transition: transform 1000ms ease-in-out; }
  • [NODEBB] Help for my custom CSS

    Solved Customisation nodebb css bugfix
    237
    49 Votes
    237 Posts
    80k Views
    @baris said: You should change your selectors so it doesn’t look at the entire document. You probably only want to apply fancybox to stuff inside the #content element which is what changes when the user navigates around the page. So use $('#content a').... for your selectors then the forum logo in the header won’t be selected. I modified the JS Fancybox code now and this code and it seem better // --------------------------------------------- // Fancybox Media Reader (Without Website Logo) // --------------------------------------------- if (top.location.pathname !== '/login') { $(window).on('action:posts.loaded', function(data) { console.log("Polling DOM for lazyLoaded images to apply Fancybox"); $(document).ready(function() { $('#content a').not('.forum-logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); }); }); }); } if (top.location.pathname !== '/login') { $(document).ready(function() { $(window).on('action:ajaxify.end', function(data) { $('#content a').not('.logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); data.preventDefault() // Strip out the images contained inside blockquotes as this looks nasty :) $('#content blockquote img').remove(); }); Fancybox.bind( '#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]', { groupAll: true, } ); }); }); } // Chat fancybox - fires when chat module loaded and AJAX calls new chat $(document).ready(function() { $(window).on('action:chat.loaded', function(data) { // >>> Se limiter au contenu principal uniquement <<< $('#content img').not('.forum-logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { var newHref = $(this).attr("src"); $(this).wrap("<a class='fancybox' href='" + newHref + "'/>"); $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); data.preventDefault(); // Strip out the images contained inside blockquotes as this looks nasty :) $('#content blockquote img').remove(); }); Fancybox.bind( '#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]', { groupAll: true, } ); }); }); For the logo, I must use overflow: visible !important; on [component="brand/logo"] /* --- Logo --- */ [component="brand/logo"] { max-height: 50px; width: auto; height: auto; max-width: 100%; display: block; object-fit: contain; object-position: left center; overflow: visible !important; } Better result !!
  • NodeBB Footer

    Solved Customisation footer nodebb
    10
    1 Votes
    10 Posts
    2k Views
    @phenomlab said in NodeBB Footer: @jac and you. Hope all is well and you recover quickly Thanks pal