Do you mean you uploaded a plugin directly on your server?
Discourse must compile the plugin’s JavaScript assests firstly. You should upload the plugin to a GitHub repository, edit app.yml to add it, then ./launcher rebuild app
Directly uploading the plugin to the plugins folder without compiling will cause the Discourse frontend to not find the compiled file and cause errors.
Also, if you have cloudflare enabled for your server, remember to turn off auto-minify and delete the cache.
Thank you so much for the help. It worked for me by turning off the auto-minify for Cloudflare.
As I am new to discourse, Hence, I don’t know much how to work with plugin. So, I was trying to add plugin in plugins folder but I tried what you suggested that worked for me by uploading plugin on GitHub and fetch it from GitHub Repository.
May I ask you one more thing, Can you please guide me how can I add custom fields or any additional fields to topic? Actually, I want to create a plugin which enhance topic functionality. I want to add custom fields for topic and store it’s data in database and render it in the topics details page.
You should start a new topic for that and the question itself is too broad for a real answer, but you should have a look at Developing Discourse Plugins - Part 1 - Create a basic plugin and the rest. You’ll want to search for stuff about creating topic_custom_fields and adding them to the serializer. See GitHub - discourse/all-the-plugins to get all of the plugins and then you can search those for examples.
You might say more about what you’re doing that requires the custom fields, as there could be some other way to accomplish that task without custom fields and without a plugin.