Ubuntu 16.04 executing '/path/to/nodebb start' causes error

  • In the terminal if I set my cd to the root of nodebb install and execute ./nodebb start, NodeBB starts up fine. However if my cd is elsewhere and I execute /path/to/nodebb start I receive errors:

    throw err;

    Error: Cannot find module '/root/app.js'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:974:3
    [cluster] Child Process (2235) has exited (code: 1, signal: null)

    I'm trying to create an init.d script which will execute '/path/to/nodebb start' on system startup. Currently my solution is to move nodebb installation to the /root/ directory or create shortcuts from /root/ to nodebb, is there a better solution?

  • Global Moderator Plugin & Theme Dev

    @Crayz just cd into the NodeBB directory before calling ./nodebb start

  • @PitaJ Worked, thanks 🙂 For some reason I had the idea cd wouldn't work there

  • This post is deleted!

Suggested Topics

| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.