johnagan / clean-webpack-plugin

A webpack plugin to remove your build folder(s) before building
MIT License
1.96k stars 134 forks source link

Type 'CleanWebpackPlugin' is not assignable to type '((this: Compiler, compiler: Compiler) => void) #190

Closed thisVioletHydra closed 3 years ago

thisVioletHydra commented 4 years ago

Issue description or question

Type 'CleanWebpackPlugin' is not assignable to type '((this: Compiler, compiler: Compiler) => void) | WebpackPluginInstance'.
  Type 'CleanWebpackPlugin' is not assignable to type 'WebpackPluginInstance'.
    Types of property 'apply' are incompatible.
      Type '(compiler: import("c:/FRONTEND/www/group-dashboard/group-dashboard-postman/node_modules/clean-webpack-plugin/node_modules/@types/webpack/index").Compiler) => void' is not assignable to type '(compiler: import("c:/FRONTEND/www/group-dashboard/group-dashboard-postman/node_modules/webpack/types").Compiler) => void'.
        Types of parameters 'compiler' and 'compiler' are incompatible.
          Type 'Compiler' is missing the following properties from type 'Compiler': _pluginCompat, _plugins, plugin, apply, and 17 more.

Webpack Config

// paste your webpack config here

Environment

Run: npx envinfo --system --binaries --npmPackages clean-webpack-plugin,webpack

# Paste the result here
thisVioletHydra commented 3 years ago

I removed depricated plugins and it worked! β˜πŸΎπŸ‘πŸΎ