Skip to content

Type conflicts with JS client due to @metaplex-foundation/umi being a regular dependency instead of peer dependency #64

@serejke

Description

@serejke

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions