cannot load webtorrent in my plugin.

Solved Plugin Development

Suggested Topics


  • 0 Votes
    7 Posts
    546 Views

    @baris OK. I changed this and it works now. Thanks!

  • 0 Votes
    3 Posts
    331 Views

    @julian Thanks for getting back to me quickly. Other priorities pulled me away from this, but after looking at your response, it seems like what I'm actually after are "unread" counts, not just notifications. The simple GET solution returned notifications, but not every "unread". Our app is using the session sharing plugin, and we are associating NodeBB accounts with our app accounts. Would I be able to leverage some of the session sharing functionality to get an unread count for users on our app based on their NodeBB account? Thanks

  • 0 Votes
    6 Posts
    622 Views

    I can tell u what runFunction() is, I just simplified it for a better understanding.
    Because what I just to replace is this condition if( $.inArray( parseInt(ajaxify.data.cid, 10) , CategoriesIds) != -1) instead of going search if the current category is on the array CategoriesIds above (hardcoded), I need to check if the current category is on the selection made by the user on the plugin config page.

    And I'm not realizing how I make that connection between the plugin settings and the function.

    I don't know if I'm making sense to you, but here is the repository with all the code: https://github.com/jtsimoes/nodebb-plugin-nsfw

  • 0 Votes
    1 Posts
    1k Views

    Hi guys,
    I used ./nodebb dev to develop my first plugin, everything worked smoothly, but when I activated it in production, the server didn't started at all with this error:

    nodebb[12835]: {"level":"error","message":"[meta/js] Could not compile nodebb.min.js: SyntaxError: Unexpected token: name (bool)","timestamp":"2016-11-22T18:24:25.854Z"} nodebb[12835]: {"message":"SyntaxError: Unexpected token: name (bool)","stack":"Error: SyntaxError: Unexpected token: name (bool)\n at ChildProcess.<anonymous> (/var/nodebb/src/meta/js.js:182:15)\n at emitTwo (events.js:106:13)\n at ChildProcess.emit (events.js:191:7)\n at process.nextTick (internal/child_process.js:744:12)\n at _combinedTickCallback (internal/process/next_tick.js:67:7)\n at process._tickDomainCallback (internal/process/next_tick.js:122:9)","level":"error","timestamp":"2016-11-22T18:24:25.855Z"}

    the point is that on dev it never happened before, what I'm doing wrong?

  • 0 Votes
    3 Posts
    2k Views

    Hello Julian. Thank you for your very useful answer.
    The plugin was an old version.
    I just did uninstall then reinstall the last nodebb-api-write plugin (version 3.1.5) on our instance, but now I get the following error :
    /admin/plugins/write-api Introuvable (not found)