-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Broken TypeScript typings on fresh install #3777
Comments
Yikes! We'll have to look into this. Hopefully this is as simple as adding Thanks for reporting! |
@gnidan looks like this may be related to |
Same problem with NPM 6 and node 14.16.0 here |
Hi @binzydev, We might have to move some types from yarn add -D @types/web3@"1.0.20" @types/ethereum-protocol@"^1.0.0" |
Hi @cds-amal I've got both and no luck, can you confirm you tested? |
Hey @Butterneck that is weird. What is the error? Here's the text cast of my test |
@cds-amal, thx, it resolves the problem. |
Hello @Butterneck , some release of npm install @types/web3@1.0.20 |
This is fixed and released in v5.4.23 |
I am still facing the problem with the latest version of wallet provider. To solve I needed to manually install "@types/web3-provider-engine" "@types/ethereum-protocol" and lock "@types/web3" to the version mentioned above. So I'm not sure the issue have actually been resolved. |
Thanks for the report @ali-bahjati. I confirmed the broken behavior. |
Same issue |
So it turns out this won't affect the distributed package. I tried this and manually included it in a test project. However, there is nothing in there that would affect things at compilation-time it seems. |
... by adding, and pinning, yet more dependencies?! Attributions; - trufflesuite/truffle#3777 - trufflesuite/truffle#3777 (comment)
This should be fixed in v5.6.9. |
Issue
After a fresh install of
@truffle/hdwallet-provider
(other packages possibly affected as well) TypeScript typings are not working correctly and compilation fails.Steps to Reproduce
npm install @truffle/hdwallet-provider web3
src/index.ts
:npx typescript --esModuleInterop src/index.ts
Expected Behavior
Compilation succeeds without any issues.
Actual Results
Typecheck fails with the following errors:
Environment
truffle version
):Truffle v5.1.65 (core: 5.1.65) Solidity v0.5.16 (solc-js) Node v15.7.0 Web3.js v1.2.9
node --version
):v15.7.0
npm --version
):7.4.3
The text was updated successfully, but these errors were encountered: