Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript error with webpack 5.x #161

Closed
yoavain opened this issue Mar 24, 2021 · 2 comments · Fixed by #162
Closed

TypeScript error with webpack 5.x #161

yoavain opened this issue Mar 24, 2021 · 2 comments · Fixed by #162

Comments

@yoavain
Copy link

yoavain commented Mar 24, 2021

Getting the following error after updating from 4.6.1 to 4.7.0

Error: webpack.config.find-duplicates.ts(8,9): error TS2322: Type 'DuplicatesPlugin' is not assignable to type 'WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void)'.
  Type 'DuplicatesPlugin' is not assignable to type 'WebpackPluginInstance'.
    Types of property 'apply' are incompatible.
      Type '(compiler: ICompiler) => void' is not assignable to type '(compiler: Compiler) => void'.
        Types of parameters 'compiler' and 'compiler' are incompatible.
          Property 'plugin' is missing in type 'Compiler' but required in type 'ICompiler'

Here's a link to my PR that fails:
https://github.com/yoavain/webpack-playground/pull/401/checks?check_run_id=2185910775

@ryan-roemer
Copy link
Member

@yoavain Thanks for the issue and reproduction! Can you try out inspectpack@4.7.1 which has a fix and confirm that solves the issue for you?

@yoavain
Copy link
Author

yoavain commented Mar 24, 2021

Build passed:
https://github.com/yoavain/webpack-playground/pull/401/checks?check_run_id=2187714594
Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants