'Strapi custom plugin hot reload error. How can I fix this?

I am developing a custom screen for admin panel, that is called a plugin in Strapi. I run the app using strapi develop --watch-admin But whenever I save the file in my IDE, it hot reloads, but gives me an error saying

Warning: An error occured while requesting the API , and logs me out.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source