Error in render: "TypeError: Cannot read property 'matched' of undefined" solution

Error handling about webpack router plugin using vue-cli

Let's explain it directly by the picture above: the pitfalls that novices will encounter!
1. Using npm to run the command normally will report an error:
command normal
2. But the page will appear: [Vue Warning]: Rendering error: "TypeError: Cannot read property 'match' of undefined"
wrong picture
3. Direct and specific solutions:
wrong instance
4. Change to the following code:
changed code
5. The running page returns to normal:
insert image description here
6. For more information and reference, please refer to the official document vue-router official website document

Guess you like

Origin blog.csdn.net/weixin_40069439/article/details/102745145