Plugins not displaying in Admin console



  • I can't seem to get any custom plugins to show up in the Admin console.

    I followed the "Writing Your First NodeBB Plugin" tutorial, but no matter how many times I restart / reload the server it still doesn't even show up in the Extend -> Plugins page.

    I'm also getting no results when I try to change the theme, I click 'Use' button, get the prompt to restart, and no changes have happened on restart.

    Does anyone have any suggestions to what I could be doing wrong / broken config?

    Thanks!


  • Admin

    Is there any errors in your browser's console?



  • The only error I'm getting occasionally in the console is:

    Uncaught IndexSizeError: Failed to execute 'arc' on 'CanvasRenderingContext2D': The radius provided (-0.5) is negative. :: chart.min.js?v=v0.6.1-15-ga1f49f6:10

    All I have in the plugin folder is the library.js file (with the console.log statement) and the plugin.json file (with 5 items).

    I can download and install external plugins through the dashboard without problems.

    I've resolved the issue with the theme being applied - I had been running the app with 'node app.js' which was not allowing the server to restart correctly. Once I started the server with the ./nodebb start command, it could restart correctly and apply the theme / skin.

    I've also updated to the 0.7.x build as I need to use the write api, this hasn't resolved the issue.

    I have just noticed that in the nodebb logs I'm seeing:

    18/5 11:11 [4464] - ←[36mverbose←[39m: * using themes stored in: C:\NodeBB\node_modules
    { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
    { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
    { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
    { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }

    I really want to get my teeth into developing plugins for the forum, but seem to be stumbling at the first hurdle! 😞



  • I've also checked the response from the "api/admin/extend/plugins" rest service, and the plugin isn't in the response...



  • Nobody?

    Is this because this is a dumb question, or because nobody knows the answer?!

    😞



  • In the documentation it mentions:

    As of v0.0.5, “installing” a plugin by placing it in the /plugins folder is still supported, but keep in mind that the package id and its folder name must match exactly, or else NodeBB will not be able to load the plugin. This feature may be deprecated in later versions of NodeBB.

    Has this been deprecated now? Would this explain why it isn't showing up in the admin console?



  • The plugin goes in the node_modules folder, inside a folder titled like nodebb-plugin-plugin-name

    Should then appear in Plugins



  • I found it last night, It may have been obvious, but was not explicitly listed as a step in the tutorial:

    For the plugin to be picked up, it also requires a package.json file to be created! Once you have all three files, this seems to be the minimum requirements for a plugin.



  • @snodejoke got exactly same problem, thx for the answer. it is enough to specify name and version in package.json, but version should always have x.y.z format


  • Staff Admin

    Yeah nodebb plugins are npm modules so they need to have a package.json file. The plugin.json file is just for nodebb.


Log in to reply
 

Suggested Topics

| |