I started learning vue3 recently, because I have been using vue2. X before. When I write vue3, I will find that there are some differences between the two. Then I will have a variety of problems during practice. I summarize and share it with you here.
“export ‘createRouter’ was not found in ‘vue-router’
“export ‘createWebHashHistory’ was not found in ‘vue-router’
2. Error reporting causes and Solutions
If you read my last article, you should be able to see the reason for the error at a glance. This error occurs because we use the wrong
Vue router package. We have installed version 2. X. because we are developing and using vue3, we also need to install the Vue router package of vue3. We only need to uninstall the previously installed Vue router package, and then reinstall the Vue router package of vue3.
// uninstall vue2.x vue-router npm uninstall vue-router --save // install vue3 vue-router npm install [email protected] --save
This can be solved. I hope it will help you!
- [Solved] Vscode Error: “export ‘default‘ (imported as ‘VueRouter‘) was not found in ‘vue-router‘
- Can’t read property ‘push’ of undefined [How to Solve]
- Error starting vue project these dependencies were not found:create in ./src/router/modules/md.js
- TypeError: res.render is not a function
- Solve the data transfer between vue irrelevant components error: this.$store.commit is not a function
- How to Solve Error: avoided redundant navigation to current location: “index/user”
- How to Fix Webpack run error webpack dev server
- Filezilla Error: You appear to be behind a NAT router. Please configure the passive mode settings and …
- [Solved] Vue Install less Error: this.getOptions is not a function
- When starting Vue project: cannot find module ‘webpack cli / bin / config yargs’ error resolution
- Vue+TS main.ts error: unused expression, expected an assignment or function call
- The browser is compatible with IE11 “ReferenceError: ‘Promise’ is not defined” “ReferenceError: ‘Promise’ is not defined”
- Module not found: Error: Can‘t resolve ‘sass-loader‘
- Docker service startup error: Job for docker.service failed because the control process exited with error code.
- Angular_ Error: Cannot assign to a reference or variable!
- Gulp compression error: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module…
- [Solved] UserWarning: CUDA initialization: CUDA unknown error
- [environment] docker: error response from daemon: OCI runtime
- [Solved] Faceswap Error: CRITICAL An unexpected crash has occurred.You MUST provide this file if seeking assistan