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

[Help]没有办法使用vue-router,基础使用也会报错! #169

Closed
mJunLiang opened this issue Jun 27, 2022 · 4 comments
Closed

[Help]没有办法使用vue-router,基础使用也会报错! #169

mJunLiang opened this issue Jun 27, 2022 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@mJunLiang
Copy link

安装了 vue-router@4 根据官网“入门” main.ts 正常引入了 vue-router

在APP.vue内加入router-link或router-view就会报错。

router-view报错:Uncaught TypeError: Cannot read properties of null (reading 'parent')

router-link报错:Uncaught TypeError:Cannot destructure property 'options' of 'vue.inject(...)' as it is undefined.

度娘已经搜索过无数次,找不到任何解决方法。自己通过vite创建的项目没有这个问题。 有没有人遇过此问题,已经解决的!麻烦告知一下。

@mJunLiang mJunLiang added the help wanted Extra attention is needed label Jun 27, 2022
@mJunLiang
Copy link
Author

已经找到问题了,vue 3.2.36 有此问题,升级到3.2.37 就正常了 郁闷死了 浪费一下午时间!!!

@mJunLiang
Copy link
Author

补充一下,不是升级vue的问题,vue 在devDependencies下 就会报错,vue安装到dependencies下就正常。不知道什么原因!

@caoxiemeihao
Copy link
Member

caoxiemeihao commented Jun 27, 2022

你确定你看了 README?

@caoxiemeihao
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants