"模块"类型中缺少属性"热"

Kri*_*tya 4 types typescript reactjs

大家好,当我使用@ types/node for aws-cognito-identity provider时,我得到以下错误.

Class 'Module' incorrectly implements interface 'NodeModule'.
        Property 'hot' is missing in type 'Module'.
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助.我认为它与@ types/webpack-env冲突

csm*_*cnz 6

看起来有可能是之间的重大更改@types/node@8.0.26,并@types/node@8.0.27导致此错误,可能连同@types/webpack-env@1.13.0(我的版本至少).

回滚到8.0.26(加入"@types/node": "8.0.26"我的package.json)似乎现在已经解决了.

编辑:看起来更近一点,似乎已经注意到并且提出了一个问题:https: //github.com/DefinitelyTyped/DefinitelyTyped/issues/19601 +修复PR已打开:https: //github.com/DefinitelyTyped/DefinitelyTyped /拉/ 19602