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

Cannot find module 'web3/eth/types' or its corresponding type declarations. #7

Open
DavidVojnicHajduk opened this issue Mar 23, 2022 · 2 comments

Comments

@DavidVojnicHajduk
Copy link

File node_modules/@maticnetwork/maticjs-web3/dist/ts/utils/web3_tx_to_matic_tx.d.ts is responsible for the error, I have tried reinstalling the package and manually installing the web3 package but it didn't help.

@AlexandrVolfson
Copy link

Looks like it tries to find 'Transaction' and I noticed that Transaction exists here web3-eth/types/index.d.ts (if web3 is installed)
So, I changed
import { Transaction } from "web3/eth/types"; line to
import { Transaction } from "web3-eth/types"; (changed slash to dash)
in node_modules/@maticnetwork/maticjs-web3/dist/ts/utils/web3_tx_to_matic_tx.d.ts and issue dissappeared.

@deep-quality-dev
Copy link

That's a tricky way, Is there any way to fix this issue without any changing in node_modules?

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

No branches or pull requests

3 participants