Just screwed my NodeBB installation

General Discussion
  • Hi there.

    I'm very new to NodeBB. Just installed two days ago.

    Wanted to have the bleeding edge NodeBB to try Blue Posts plugin and I screwed it up 🙂

    What I did?

    I pulled the repository as this.

    git pull

    on my NodeBB root directory.

    I guess that wasn't the right procedure to update. Now I get this when trying to start NodeBB:

    ./nodebb dev
    [after some other OK messages]
        throw err;
    Error: Cannot find module 'templates.js'
        at Function.Module._resolveFilename (module.js:338:15)
        at Function.Module._load (module.js:280:25)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object.<anonymous> (/home/mauricio/nodebb/src/emailer.js:7:14)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:364:17)
    [loader] Experienced three start attempts in 10 seconds, most likely an error on startup. Halting.

    Please, can anybody point me to the right procedure to update to bleeding edge from repo the next time?

    And if is not too much to ask: How could I fix this besides reinstalling NodeBB again?


  • I think @psychobunny recently added the templates.js module into package.json. So you will have to run npm install in the nodebb directory. Then try starting again.

  • @baris It worked!

    npm install
    [other stuff]
    [email protected] node_modules/templates.js

    Thanks very much! 🙂

  • No problem 🙂

  • Just saw I should started here: Upgrading NodeBB

    Leave it for future newbies.

Suggested Topics

  • Add to NodeBB sections

    General Discussion
    0 Votes
    11 Posts
  • 0 Votes
    5 Posts

    @PitaJ Thanks you! Problem solved. Didn't look like NodeBB 1.3.0 i don't need to run ./nodebb build before i restart NodeBB

  • 0 Votes
    15 Posts


    BTW, why do I have a browser window? Is it because Iam using Android, or I am running nodebb 1.14?

    It's because you're running 1.14 actually. The actual scripts for installable PWA only appeared in 1.15.
    However, browsers are confusing so they also offer the option to "add to home screen" any website, but instead of actually considering its manifest for how it's supposed to run and using the service worker properly it will be just an icon to open that website in the browser.

    I would've recommended checking this website to see how it's supposed to work, but it seems to be broken in 1.16.2 unfortunately (mentioned in this issue - service worker was moved to its own directory so only paths starting with /assets/src/ are in its scope.)

    EDIT: while it was mentioned in the issue #9193, it wasn't the main focus. I commented on it on #9127, solution to which actually broke the service worker

  • Nodebb - my opinion

    General Discussion
    2 Votes
    28 Posts

    @exodo composer #5 is a bad PR, as I pointed out in the PR itself. I know what you mean though, it's annoying waiting weeks for PRs to be merged. However, it also takes time to test PRs before merging.

  • 0 Votes
    6 Posts

    Looking forward to when we can have a "Make Forum Private" option that sets all permissions on all forums automatically so that you don't have to go about changing each one.