vite中使用vue-router报错vue-router.js?v=6e8255eb‘ does not provide an export named ‘createRouter‘

本文介绍了解决Vue-Router版本过旧导致的问题的方法。通过执行npm install vue-router@next -S命令来更新Vue-Router到最新版本。

解决方法: 升级vue-router。
执行命令:

npm install vue-router@next -S 
vue-router.js?v=acb577b8:204 [Vue Router warn]: uncaught error during route navigation: warn @ vue-router.js?v=acb577b8:204 triggerError @ vue-router.js?v=acb577b8:2771 (匿名) @ vue-router.js?v=acb577b8:2554 Promise.catch pushWithRedirect @ vue-router.js?v=acb577b8:2545 push @ vue-router.js?v=acb577b8:2481 handleMenuItemClick @ element-plus.js?v=55895f4d:23463 handleClick @ element-plus.js?v=55895f4d:23708 callWithErrorHandling @ chunk-VMGSXAPY.js?v=2122b12a:2295 callWithAsyncErrorHandling @ chunk-VMGSXAPY.js?v=2122b12a:2302 invoker @ chunk-VMGSXAPY.js?v=2122b12a:11297 vue-router.js?v=acb577b8:2773 SyntaxError: The requested module '/node_modules/.vite/deps/echarts_components.js?v=eebb895f' does not provide an export named 'XAXisComponent' (at AllSupplier.vue:20:3) triggerError @ vue-router.js?v=acb577b8:2773 (匿名) @ vue-router.js?v=acb577b8:2554 Promise.catch pushWithRedirect @ vue-router.js?v=acb577b8:2545 push @ vue-router.js?v=acb577b8:2481 handleMenuItemClick @ element-plus.js?v=55895f4d:23463 handleClick @ element-plus.js?v=55895f4d:23708 callWithErrorHandling @ chunk-VMGSXAPY.js?v=2122b12a:2295 callWithAsyncErrorHandling @ chunk-VMGSXAPY.js?v=2122b12a:2302 invoker @ chunk-VMGSXAPY.js?v=2122b12a:11297 AllSupplier.vue:20 Uncaught (in promise) SyntaxError: The requested module '/node_modules/.vite/deps/echarts_components.js?v=eebb895f' does not provide an export named 'XAXisComponent' (at AllSupplier.vue:20:3) vue-router.js?v=acb577b8:204 [Vue Router warn]: uncaught error during route navigation: warn @ vue-router.js?v=acb577b8:204 triggerError @ vue-router.js?v=acb577b8:2771 (匿名) @ vue-router.js?v=acb577b8:2554 Promise.catch pushWithRedirect @ vue-router.js?v=acb577b8:2545 push @ vue-router.js?v=acb577b8:2481 handleMenuItemClick @ element-plus.js?v=55895f4d:23463 handleClick @ element-plus.js?v=55895f4d:23708 callWithErrorHandling @ chunk-VMGSXAPY.js?v=2122b12a:2295 callWithAsyncErrorHandling @ chunk-VMGSXAPY.js?v=2122b12a:2302 invoker @ chunk-VMGSXAPY.js?v=2122b12a:11297 vue-router.js?v=acb577b8:2773 SyntaxError: The requested module '/node_modules/.vite/deps/echarts_components.js?v=eebb895f' does not provide an export named 'XAXisComponent' (at AllSupplier.vue:20:3) triggerError @ vue-router.js?v=acb577b8:2773 (匿名) @ vue-router.js?v=acb577b8:2554 Promise.catch pushWithRedirect @ vue-router.js?v=acb577b8:2545 push @ vue-router.js?v=acb577b8:2481 handleMenuItemClick @ element-plus.js?v=55895f4d:23463 handleClick @ element-plus.js?v=55895f4d:23708 callWithErrorHandling @ chunk-VMGSXAPY.js?v=2122b12a:2295 callWithAsyncErrorHandling @ chunk-VMGSXAPY.js?v=2122b12a:2302 invoker @ chunk-VMGSXAPY.js?v=2122b12a:11297 AllSupplier.vue:20 Uncaught (in promise) SyntaxError: The requested module '/node_modules/.vite/deps/echarts_components.js?v=eebb895f' does not provide an export named 'XAXisComponent' (at AllSupplier.vue:20:3)
09-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值