When you clone a Vue project from the open source platform, it is reported that the corresponding module cannot be found after logging in.
After searching a lot, it was finally solved.
export const loadView = (view) => { return () => import(`@/views/${view}`) }
Change to the following
export const loadView = (view) => { return (resolve) => require([`@/views/${view}`], resolve) }
It can be solved.
Cause: there is a problem with the webpack version. Dynamic import in webpack 4 does not support variable mode
The project can be seen in the elephant template.
Read More:
- [Solved] Node Create Express Project Error: Failed to lookup view “error“ in views directory
- Error: Cannot find module ‘./application‘ [How to Solve]
- [Solved] ERROR in ./src/main.ts Module not found: Error: Can‘t resolve ‘xxx‘
- [Solved] Vue Project Error: Error: Cannot find module ‘webpack‘ Require stack以及Error: Rule can only have one resource so
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error resolution
- [webpack-cli] Error: Cannot find module ‘vue/compiler-sfc‘
- [Solved] Module build failed TypeError this.getOptions is not a function at Object.loader
- Error Cannot find module ‘worker_threads‘ [How to Solve]
- Node.js Error: Cannot find module express [How to Solve]
- [Solved] UMI Project Error: uncaught at _callee3 at _calle3
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils
- Can’t resolve ‘ansi-html-community’ & Cannot find module ‘is-docker (vuex-persistedstate Installed)
- The vue3 project Error: Cannot find module’vue-loader-v16/package.json’
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- [Solved] ERROR Error: Cannot find module ‘vue-loader-v16/package.json‘
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils‘
- How to Solve Nodejs error: cannot find module ‘. /application’
- [Solved] Error: Cannot find module ‘vue-template-compiler/package.json‘ Require stack:
- Node.js Error: Error: Cannot find module ‘express‘ [How to Solve]
- [Solved] Syntax Error: Error: Loading PostCSS Plugin failed: Cannot find module ‘autoprefixer‘