-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
@types/node Class 'Module' incorrectly implements interface 'NodeModule'. #19601
Comments
Perfect, thanks, was quite in this moment writing the same issue. This seems to be an conflict with |
My guess would be that somewhere in the project you augment As a temporary fix you can either remove augmentation
I'll submit a PR to fix this issue soon. |
This causes type errors, when people augment NodeModule intefrace by adding more properties to it. Which seems to be pretty common in a wild. Fixes DefinitelyTyped#19601
still getting the same error. It seems you NEED to add |
@burabure The contents of your |
ok the issue was that another of my deps |
@burabure what was your solution. I'm in the same boat. Just remove webpack-env, as storybook will bring it in as a dependency? |
@micahgodbolt I did |
@burabure, @micaelmbagira I was able to solve this problem by downgrading @types/webpack-env to 1.14.1. |
I had this same issue, although with a slightly different error message. Downgrading to Below was my error when running Here's the error:
|
for the get type error buddy, you can add |
My team also ran into this issue, and downgrading @types/webpack-env did not help. Instead, we were able to resolve it by rolling back @types/node@14.10.1 to @types/node@14.0.27 |
Same problem with |
Having this problem with |
DT piggy-backs on semver, so you should specify exact versions of |
@sandersn So maybe those of us who are affected should try to target the packages that use @types/node instead? I could see that leading to having multiple installs of @types/node at slightly different versions, I'm not familiar enough with how these types are used to determine if that'd be an issue but I'd expect it to be fine. |
Works again with |
I have the error |
What are the odds that there's different versions of the same package? Here's an idea to help us figure things out. For anyone experiencing this problem currently and in future:
|
Same issue with 14.11.2 in my project. Tried downgrading to Working tree (including lockfile and package.json) -> https://github.com/ivx/react-skeletons/tree/d3ffc9fbbcf3f7c08a230e9c287a55b53d785ac7 Resolved it by removing
|
The solution which is worked for me
Done |
@types/node
package and had problems.Definitions by:
inindex.d.ts
) so they can respond.Compilation cannot succeed with the version 8.0.27 installed. The error is
node_modules/@types/node/index.d.ts(5615,11): error TS2420: Class 'Module' incorrectly implements interface 'NodeModule'. Property 'hot' is missing in type 'Module'.
Version 8.0.26 does not have this error.
The text was updated successfully, but these errors were encountered: