-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Plugins for Webpack 5 and DT compatibility #52847
Comments
Hmm, the PR you linked looks right to me. The version of webpack you have doesn't match the version from @types/dotenv-webpack. What do the respective package.jsons in node_modules/webpack and node_modules/@types/dotenv-webpack say? (I'm also interested to see what the versions of tapable are, though it doesn't appear to have a problem here.) |
Ouch, I opened this in a tab and it got stalled there :/ sorry. webpack says @types/dotenv-wepacks says. At the first sight, I don't see anything wrong. |
Does |
In that case, I think you'll find that the version in the nested webpack's package.json is different from the toplevel webpack's package.json. |
hmmm, the nested version is |
You might check the git history for types.d.ts for the dates between 5.31 and 5.37. I suspect incompatible types tend to ship as minor versions more often than other incompatibilities. |
You're right. There seems to be some BC incompatible changes. I'll ignore it. |
Remove the webpack@ section from the yarn.lock and rerun yarn. It will re-resolve both semver requests to the latest webpack@5 and dedupe them. |
Ok, I just stumbled upon the same thing and your solution worked again. Thanks! |
So I have updated the types for w5 according to #52225 for:
However, I'm still getting such error w/ TS 4.2 for both:
The types of
Compiler
are identical. The issue is in something I don't fully comprehend. I found how to "fix" it manually:cd node_modules/@types/dotenv-webpack
yarn install
Don't know why it works though. @sandersn mentioned here #52225 (comment) that it's not fully documented yet and maybe also not fully supported?
Installing dependencies for the type folder resolves the type incompatibility.
Before:
After:
The text was updated successfully, but these errors were encountered: