'Seeing' scoped npm packages

Plugin Development
  • Is there any way to force NodeBB to see a plugin that doesn't match the nodebb-plugin- name structure?

    My organization is using scopes to have 'private' packages published to our private registry. (Our private registry is still public so this still meet's NodeBB's GPL 3 license)

    This means the plugin name comes through as @acmecorp/nodebb-plugin-pluginname. This in turn means the plugin isn't seen by NodeBB and not listed in the admin installed packages and therefore can't be activated.

    Though a little less common, scoped packages are a standard part of npm. NodeBB should be able to handle this use case.

  • @smi-jonathan This is something we'd like to support. Please open an issue on Github so we can track it more easily. Thanks


Suggested Topics


  • 0 Votes
    5 Posts
    560 Views

    @antosik @baris
    Nice, Thank you all!

  • 0 Votes
    8 Posts
    1k Views

    @Joykiller said in Proper way to return res.redirect('')?:

    @julian said in Proper way to return res.redirect('')?:

    Callbacks don't work all that nicely with async functions... I think stripe.subscribe is called with await and returns undefined before the isValueID method is called and returns.

    I added asyncs to test, removed them same issue with headers response from res.redirect. Oh i see what this plugin does, I guess i could write it to the session and then call it from there. Argh im at a loss that didnt work either still same header issue. seems like even the other values prob would do the same as mine I duno if the way it was coded from base was correct.

    Nevermind I got it working with writing to the session first, had an error on previous attempt.

    Thanks for the help.

  • 1 Votes
    3 Posts
    655 Views

    I appreciate the reply. It looks like after a bunch of tinkering, it seems to be working. I put the plugin into one of the persistent folders, then made a script that I execute via Docker-Compose just before I call grunt which handles the actual linking and then it showed up.

  • 1 Votes
    11 Posts
    4k Views

    I did a try and i liked it 🙂

    It would be awesome if you could choose what category works that way and what category works on the standard forum way 🙂

  • 0 Votes
    1 Posts
    1k Views

    First of all, I'm new to NodeJS development. I'm liking it so far (except for a few annoyances here and there).

    I am extending development of nodebb-plugin-import-ipboard (forked and will send a PR once it's done) to support a bunch of stuff the current plugin does not currently support, for instance:

    IPB replies which are in a special blockquote format. Spoiler blocks Mentions A few more things...

    On my nodebb-plugin-import-ipboard/index.js file, which I'm requiring from a manual test.js file (so it's not running inside NodeBB!), I placed a:
    var db = require('nodebb-plugin-import/server/db');

    But when I try to use it like this:
    var imported_post = db.getObject("_imported_post:1566");
    I just get "undefined".
    I can see on the debugger variables Redis is loaded (but I don't know if it was loaded correctly.)

    I also tried loading data instead of db:
    var data = require('nodebb-plugin-import/server/data');
    and
    var imported_post = data.getImportedPost("1566");

    And I just get undefined.
    Can someone tell me what I'm doing wrong?