Before, the project directory was:
it ran successfully. Later, a new build file directory was created and the webpack.config.js It is moved to the build file,
package.json Script in
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node ./src/koa.js",
"build": "webpack --config ./build/webpack.config.js"
},
After configuration, run the
$ npm run build
Results error prompt:
Read More:
- NPX webpack cannot find module’html webpack plugin’a bug causes headache
- extract-text-webpack-plugin" loader is used without the corresponding plugin Error (Fixed)
- Run webpack error: Error: Cannot find module’webpack/lib/node/NodeTemplatePlugin’
- Failed to load plugin jsdoc: Cannot find module ‘eslint-plugin-jsdoc‘
- Cannot read property ‘this compilation’ of undefined appears in copy webpack plugin
- Error: Cannot find module’webpack/bin/config-yargs’ solution
- [Solved] Error: Cannot find module ‘webpack/lib/RequestShortener’
- Solved – problem cannot find module ‘webpack / bin / config yargs’
- Cannot find module ‘webpack cli / bin / config yargs‘
- Error: Cannot find module ‘webpack/schemas/WebpackOptions.json’
- Failed to load plugin react: cannot find module ‘eslint plugin react’ appears when running Vue project‘
- Webpack Upgrade Error: webpack.NamedModulesPlugin is not a constructor
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error [How to Fix]
- Error: cannot find module ‘webpack / lib / ruleset’_ solve
- NPM run dev error: cannot find module ‘webpack cli / bin / config yargs‘
- Error: solution to the problem of cannot find module ‘webpack / bin / config yargs’
- VUE Error: Cannot find module ‘webpack/bin/config-yargs’
- Error: Cannot find Module ‘Webpack-cli ‘- Solution
- Webpack — module build failed: error: the node API for ‘Babel’ has been moved to Babel core
- Vscode HTML file auto supplement HTML skeleton failure