Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema
Invalid configuration object. Webpack has been initialized with a configuration object that does not match the API pattern.
Solution 1:
npm install webpack-cli -g
#install
Solution 2:
Put your webpackconfig.js Change it to the following one
var path = require('path');
module.exports = {
entry: './main.ts',
resolve: {
extensions: ['.webpack.js', '.web.js', '.ts', '.js']
},
module: {
rules: [
{ test: /.ts$/, loader: 'ts-loader' }
]
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
}
};
Similar Posts:
- Webpack high version pulls out CSS style and reports an error [Solved]
- The webpack handwritten loader introduces error: Module not found: Error: path argument is not a string
- [Solved] configuration.module has an unknown property ‘loader’
- Cannot findmodule’webpack-cli/bin/config-yargs
- Solutions to the problem that image webpack loader cannot be installed or the installation is stuck
- Webpack 4 : ERROR in Entry module not found: Error: Can’t resolve ‘./src’
- Error in xxx.js from uglifyjs after elementui upgrade [How to Solve]
- [Solved] [email protected] Error: Cannot find module ‘webpack/bin/config-yargs‘
- Vue production webpack package PathError [Solved]
- Module not found: Error: Can’t resolve ‘bundle.js’ in…