[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.optimization.splitChunks has an unknown property 'CacheGroups'. These properties are valid:
object { automaticNameDelimiter?, cacheGroups?, chunks?, defaultSizeTypes?, enforceSizeThreshold?, fallbackCacheGroup?, filename?, hidePathInfo?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, minSizeReduction?, name?, usedExports?}
-> Options object for splitting chunks into smaller chunks.
Previous version:
CacheGroups:{
vendor:{
test:/[\\/]node_modules[\\/]/,
name:'vendors',
chunks:'all'
}
}
The solution is to reduce the version or follow the new writing method
New writing:
cacheGroups: {
commons: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
},
},
Read More:
- How to Solve Error:options.query cannot be used with loaders
- How to Solve Error: Module did not self-register
- Vue require Error: node_modules/babel-loader/lib
- Taro Error: chunk common [mini-css-extract-plugin] Conflicting order between: ……
- [Solved] This is probably not a problem with npm. There is likely additional logging output above.
- How to Fix Node SASS Error in Vue + webpack project after nodejs upgrade
- [Solved] Postcss Error: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
- [Solved] Found bindings for the following environments
- [Solved] NRM Error: error code: ‘err’_INVALID_ARG_Type ‘
- [Solved] webpack.config.js configuration encountered Error: Cannot find module’@babel/core’&&Cannot find module’@babel/plugin-transform-react-jsx’
- The use of vue-echarts and compilation error solutions
- TypeError: db.collection is not a function
- [Solved] NPM Error: gyp: No Xcode or CLT version detected!
- How to Solve Import antd Error: Module build failed
- NPM start project error: cannot find module ‘webpack’ problem solution
- How to Fix Webpack run error webpack dev server
- [Solved] Error: Cannot find module ‘webpack-cli/package.json‘
- [Solved] Vue.js error: Module build failed: Error: No parser and no file path given, couldn’t infer a parser.
- Error: uncaughtexception: cannot find module ‘internal / util / types’
- [Webpack Update] vue-loader Error: Compiled with problems : ERRORModule notfound: Error:Can‘ t resolve vue in