Plugin styling not applied when not installed via ACP

Solved Plugin Development
  • Hi all,

    I am developing a plugin and I could not get the styling to be applied. Then when I checked against already available plugins, seems styling doesn't work when installed using npm link or npm i <package>.

    If it's any help, the following is my directory structure of the plugin I am developing:

    └── nodebb-plugin-quickstart
       └── static
           └── style.scss

    The following is my plugin.json

    	"scss": [

    Any help would be appreciated.
    Thank you!

  • yasasY yasas marked this topic as a question on
  • Scss is only supported on nodebb 3.x, in nodebb 2.x and previous versions you need to use less and use the less block in plugin.json.

  • Hi @baris

    I tried a less block and now it's all working well.

    Thanks a lot!

  • yasasY yasas has marked this topic as solved on

Suggested Topics

  • 0 Votes
    9 Posts

    @eeeee Probably local to the user computer 🙂

    You can generally use non-http URIs for launching different applications. If you were ever redirected from a desktop or mobile app to a browser to log in you've probably seen this in action. Windows actually uses some internally and usually transparently for the user (for example, to abuse their monopoly, MS started using microsoft-edge: scheme instead of https: in some links in Windows to only allow opening them in Edge. They didn't have to build some highly custom mechanism, just restrict other apps from registering this scheme), but usually can be just registered by applications you install. What they do also depends on the application - for example, I think calculator: only launches the calculator app (or at least the obvious way to write math doesn't work), but others can launch specific actions and even pass some information (for example, authentication token for the web login use case I mentioned). For example Spotify allows linking to artists, playlists, albums etc. via spotify: scheme and steam supports doing a ton of things via URI, including launching and even installing/uninstalling games.

    All you need is an <a> tag with the right href= set. So yeah, you can put that kind of a link in a widget, but if they wanted to have it be an action under a post, especially if it was supposed to include some information from the post, it wouldn't be that simple.
    (side note: NodeBB doesn't allow links using non-standard schemes in markdown, so you can't just put something like this in a post or signature)

  • 1 Votes
    9 Posts

    Ah, I've figured out the problem, it was a silly mistake. I had forgotten to rename the folder to match the plugin name. Thanks for verifying the quickstart plugin works.

  • 0 Votes
    1 Posts


    Is there any "clean" way to add input field in group manage panel in ACP?
    Some hook, or function?

    Thanks in advance.

  • Hosted Plugins

    Plugin Development
    0 Votes
    9 Posts

    @julian Sorry, hadn't seen that you hadn't got a private npm account to play around with!

    @psychobunny That's a really good idea, it's actually how I've been testing separate projects that use my privately hosted modules currently, before publishing the updates to the npm account.

    It would be great if support came out the box at some point though 🙂

  • 0 Votes
    3 Posts

    That error is caused by the following bit of code in src/plugins.js

    paths = { var parent = path.dirname(pluginLib); return cached.filter(function(libPath) { return libPath.indexOf(parent) !== -1; }); }).reduce(function(prev, cur) { return prev.concat(cur); });

    If paths is an empty array calling reduce will throw that error. We should add better checks to detect that.