vite创建vue项目 router报错:Uncaught SyntaxError: The requested module '/node_modules/.vite/vue-router.js?v=b45f922f' does not provide an export named 'createRouter'
标签搜索

vite创建vue项目 router报错:Uncaught SyntaxError: The requested module '/node_modules/.vite/vue-router.js?v=b45f922f' does not provide an export named 'createRouter'

Lan
Lan
2021-11-25 / 1 评论 / 1,665 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2021年11月25日,已超过373天没有更新,若内容或图片失效,请留言反馈。

1
Uncaught SyntaxError: The requested module '/node_modules/.vite/vue-router.js?v=b45f922f' does not provide an export named 'createRouter'
You should uninstall the current vue-router module and reinstall the latest (version 4) one which is compatible with Vue 3 by running :

npm uninstall vue-router

then

npm install [email protected] -S

https://stackoverflow.com/questions/65858930/does-not-provide-an-export-named-createrouter-vue-3-vite-and-vue-router

0

评论 (1)

取消
  1. 头像
    南桃
    Windows 10 · Google Chrome

    hhh点进来还吃了波狗粮

    回复