Recently, a strange issue has been occurring in my production code. Although nothing has been changed, I am now receiving reports that occasionally a template fails to load causing the page to crash. I am currently using vue 2.16.
The error messages being displayed are:
[Vue warn]: Cannot find element: #my-component-template
[Vue warn]: Template element not found or is empty: my-component-template
[Vue warn]: Failed to mount component: template or render function not defined.
Another observation I've made is that the Vue developer plugin shows two root components during these crashes, whereas normally it only shows one.
I'm not sure where to start debugging this issue since it happens infrequently, making it harder to diagnose. The project's codebase is quite extensive and old, not created by me, but was functional before. Could the server's performance be a factor due to increased stress leading to slower responses and potential asynchronous calling issues?
Any advice or suggestions on how to investigate this problem would be greatly appreciated!
Thank you.