Module '"vue-router/auto"' has no exported member 'createRouter' #347
Replies: 2 comments 1 reply
-
I'll put the answer here for anyone : you need to add the config to both tsconfig.node.json and tsconfig.app.json (might need to update the doc for those not used to ts config files like me) |
Beta Was this translation helpful? Give feedback.
0 replies
-
It seems that there is no need to edit tsconfig.node.json |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I created today a fresh Vue3 install with vue-router 4.3.0 and unplugin-vue-router 0.8.5 installed.
Changed my vite.config.ts:
Changed my tsconfig.node.json:
And then, when I changed my import with:
import { createRouter, createWebHistory } from 'vue-router/auto'
I directly get this error : Module '"vue-router/auto"' has no exported member 'createRouter'
Since I followed the doc, what did I miss here?
Beta Was this translation helpful? Give feedback.
All reactions