Webpack error: configuration.module

I have an unusual web package error and I don’t know how to fix it.

It has something to do with my configuration but I don’t know what it is. One of my students can run perfectly webpackin the console with the same project .

I previously received an error message:

PS E:\HTL\Projects\EasyWater\Software\Beispielprojekte\WebPack_Dummy> webpack
The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D

then I installed CLP Webpack globally, and now finally I get the error message:

PS E:\HTL\Projects\EasyWater\Software\Beispielprojekte\WebPack_Dummy> webpack
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module has an unknown property 'loaders'. These properties are valid:
   object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, defaultRules?, unknownContextCritical?, unknownContextRecursive?, unk
nownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }
   -> Options affecting the normal modules (`NormalModuleFactory`).

I have already reinstalled node js and literally everything, but I constantly get the same error.

As I said, my classmate can accomplish webpackusing the same project .

I have installed:

  • ts-loader -g
  • webpack -g
  • webpack-cli -g
  • typescript -g
+4
source share
1

, webpack 4, webpack.config.js, webpack 4. - . webpack 4 webpack 3 (npm install webpack@3 --save-dev), mpm build script of webpack --config webpack.config.js webpack-cli. , webpack, .

+1

Source: https://habr.com/ru/post/1694485/


All Articles