There is an issue with my Nuxt app where sometimes when the page loads, I encounter an error in the console that causes the page to stop loading other components. The error message reads:
Cannot read properties of undefined (reading 'resolved')
This is the call stack for the error:
(call stack code here)
The error originates from Vue in the function patchVnode
, specifically within this condition:
(code snippet here)
Here is the call stack for that specific issue:
Error message: TypeError: Cannot read properties of undefined (reading 'resolved')
(call stack code here)
The problem seems to occur when updating a property value that is used by a computed property. The parent component's code looks like this:
(parent component code here)
Commenting out this.loadingResults = true;
in the search method or the usage of loadingResults
in the computed property resolves the error, but these are not ideal solutions. Wrapping the problematic component in a <client-only>
tag is another workaround, but it impacts performance. I am seeking guidance on how to effectively resolve this issue.