[Solved] Vue3 Error: Cannot use ‘in‘ operator to search for ‘path‘ in undefined

when creating the route of vue3, an error is reported: cannot use 'in' operator to search for 'path' in undefined . After many troubleshooting, it is found that I used the createwebhashhistory() method incorrectly in the route file and used it as a variable.

1. Error reporting

2. Causes and solutions of error reporting

this error is reported because I mistakenly used the createwebhashhistory() method in the routing file and used it as a variable. I just need to write it as a method to solve the problem.

hope to help you!!!


Read More: