Solved Error fetching styles.css from nodebb-plugin-emoji


  • I am getting this error on my browser's console.

    It seems nodebb-plugin-emoji is not getting my config correctly.

    I am running nodebb server on localhost:4567 with nginx acting as reverse proxy on port 80 in a docker container.

    stylecss-nodebb-error.PNG

    stylecss-nodebb-error2.PNG

    Any ideas?


  • You don't understand the properties of config.json

    URL is the address at which you access the forum in the browser. This is used in emails for instance. The emoji plugin uses it as the base address for assets, because the emoji plugin assets need to work in emails as well.

    The port is just the port that NodeBB binds to on the server. The default is 4567, so setting it to 4567 has no effect.

    What URL are you using to access NodeBB from your browser? If you're accessing it at http://localhost:4567, then that's what the URL in config.json should be set to. Of you're accessing it at http://localhost or something else, then set the URL to that.


  • @xaponeis you need to change the URL in config.json to match the URL at which you access your site in the browser.


  • Thank you for you reply @PitaJ. I think my configuration in config.json file is ok. Everything is working fine except for this file from this plugin.

    It seems the plugin does not recognize the "PORT" variable from config.json.

    My config json was like this:

        "url": "${URL}",                        
        "port": "${PORT}",  
    

    I changed to:

    "url": "${URL}:${PORT}"
    

    for testing and now I dont see the error anymore:

    5766d38c-459a-4afb-8667-2c522c9e30cd-image.png

    But I don't know which one is the correct form. And whether the config like this can lead to others issues.


  • You don't understand the properties of config.json

    URL is the address at which you access the forum in the browser. This is used in emails for instance. The emoji plugin uses it as the base address for assets, because the emoji plugin assets need to work in emails as well.

    The port is just the port that NodeBB binds to on the server. The default is 4567, so setting it to 4567 has no effect.

    What URL are you using to access NodeBB from your browser? If you're accessing it at http://localhost:4567, then that's what the URL in config.json should be set to. Of you're accessing it at http://localhost or something else, then set the URL to that.


  • @PitaJ Yes, I am using http://localhost:4567 to access the forum. It seems I got it wrong how URL variable works. And as I am using the default port everything work it when I changed my config and mislead me to believe that was something wrong with the plugin.
    Thank you!

  • Topic has been marked as a question   X   xaponeis 
  • Topic has been marked as solved   X   xaponeis 

Suggested Topics

| | | |