How to specify dependency on other plugins?


  • Hi folks, I'm developing some custom plugins for NodeBB and one is dependent on the other being installed. How would I specify this kind of dependency? I know that dependencies on npm is specified as usual in package.json, but would what work in my case, since I want the forum to have the nodebb plugin installed?

    What I mean is, I'm doing module.parent.require and not just require. Would package.json/dependencies still work with that, or is there another better way?

    Best regards, I find NodeBB to be really awesome.

  • Global Moderator

    There's no way to require it. The best you can do is tell the user to do it.

    Also, it use require.main.require instead

Suggested Topics

  • 4
  • 8
  • 14
  • 1
  • 8
| |