Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 运行模板代码时报错 #94

Closed
fankaiLiu opened this issue Jun 15, 2024 · 1 comment
Closed

🐛 运行模板代码时报错 #94

fankaiLiu opened this issue Jun 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@fankaiLiu
Copy link

您使用的版本? | Your usage version?

当前版本

您做了什么操作? | What did you do?

npm run dev

您遇到了什么问题? | What are your problems?

Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')     at createRouterMatcher (chunk-HSIWMAGV.js?v=82b935d5:1101:10)     at createRouter (chunk-HSIWMAGV.js?v=82b935d5:2136:19)     at createRouter (auto:20:18)     at main.ts:14:16
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
})
提示
类型“{ history: RouterHistory; }”的参数不能赋给类型“_RouterOptions”的参数。
  类型 "{ history: RouterHistory; }" 中缺少属性 "routes",但类型 "_RouterOptions" 中需要该属性。ts(2345)
vue-router.d.ts(1244, 5): 在此处声明了 "routes"

您期望的结果是怎样的? | What is your expected outcome?

正常运行

@fankaiLiu fankaiLiu added the bug Something isn't working label Jun 15, 2024
@ileostar
Copy link
Owner

ileostar commented Jun 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants