Module not found: Error: Can't resolve 'vue-router'
时间: 2023-06-30 20:20:09 浏览: 467
vue-draggable-nested-tree:请使用he-tree-vue,不再保留vue-draggable-nested-tree
This error usually occurs when the `vue-router` package is not installed in your project or is not properly imported into your file.
To resolve this error, first make sure that `vue-router` is installed as a dependency in your project. You can install it using npm or yarn:
```
npm install vue-router --save
```
or
```
yarn add vue-router
```
Once it's installed, you can import it in your code like this:
```
import VueRouter from 'vue-router'
```
Make sure that the path to `vue-router` is correct and that you have saved the changes to your file before trying to run your project again.
阅读全文