Overview
I'm experiencing type conflicts when using lighthouse-sdk-legacy in my project. The issue stems from @metaplex-foundation/umi being declared as a regular dependency in your package.json:
|
"@metaplex-foundation/umi": "^0.9.1", |
This causes npm to install a separate copy of umi in your package's node_modules, leading to TypeScript type conflicts when trying to use types from both the root project's umi and your package's umi.
The error I'm seeing is:
Type 'import("/node_modules/lighthouse-sdk-legacy/node_modules/@metaplex-foundation/umi/dist/types/Program").Program' is not assignable to type 'import("/node_modules/@metaplex-foundation/umi/dist/types/Program").Program'
Suggested Solution:
Please consider changing @metaplex-foundation/umi to a peer dependency since it's a core dependency that should be shared with the consuming application