[Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function

Problem Description

When running the Vue project, I used the route and found that the page had no effect. Press F12 to open the browser inspection mode, and found that the error is as follows:

Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function

the cause of the problem

The installed Vue routing plugin version is too high

solution

Reduce the version, use the command to npm install [email protected]install version 3.2.0 (Work for me)
and then restart the project

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *