From 5e73c8e6c1af12affb320b5235c29adaf0a547d4 Mon Sep 17 00:00:00 2001 From: PJ404 Date: Mon, 2 Sep 2024 13:44:51 +0100 Subject: [PATCH] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 3abc32007..2bc748d65 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,35 @@ npm install @wormhole-foundation/sdk This package combines all the individual packages in a way that makes setup easier while still allowing for tree shaking. +## Troubleshooting TypeScript Compatibility + +If you encounter issues when integrating the Wormhole SDK into a TypeScript project, such as errors related to dependencies like `@coral-xyz/anchor`, `@cosmjs`, or `ethers`, here are some steps to resolve them: + +1. **Ensure all dependencies are installed correctly**: + ```bash + npm install @wormhole-foundation/sdk @coral-xyz/anchor @cosmjs ethers + +2. **Adjust your `tsconfig.json`** to include the following settings: + ```json + { + "compilerOptions": { + "target": "ES2020", + "module": "CommonJS", + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + } + } + + 3. Check for conflicting versions of dependencies, particularly when using multiple packages that depend on the same underlying libraries (e.g., `@cosmjs`). +Ensure that all dependencies are using compatible versions. + +4. **Consider using `npm dedupe`** to resolve any version conflicts: + ```bash + npm dedupe + +If issues persist, refer to the specific package documentation or reach out to the community for further assistance. + ### Advanced Alternatively, for an advanced user, install a specific set of the packages published.