metaplex-foundation / mpl-token-metadata

Program to attach additional data to Fungible or Non-Fungible tokens on Solana.
https://developers.metaplex.com/token-metadata
Other
98 stars 42 forks source link

can't install, see error below #82

Closed d3g4-deployer closed 5 months ago

d3g4-deployer commented 5 months ago

npm: '10.2.4', node: '20.11.0',

command: npm install @metaplex-foundation/mpl-token-metadata

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: undefined@undefined npm ERR! Found: @metaplex-foundation/umi@0.9.0 npm ERR! node_modules/@metaplex-foundation/umi npm ERR! @metaplex-foundation/umi@"^0.9.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @metaplex-foundation/umi@"^0.8.2" from @metaplex-foundation/mpl-token-metadata@3.1.2 npm ERR! node_modules/@metaplex-foundation/mpl-token-metadata npm ERR! @metaplex-foundation/mpl-token-metadata@"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

alexzh3 commented 5 months ago

Have the same error.

MihaiSandor commented 5 months ago

I encountered the same issue as described in #81. To resolve this, you can try running the following command: npm install --save --force @metaplex-foundation/mpl-token-metadata. cc @blockiosaurus @febo.

d3g4-deployer commented 5 months ago

hey. i resolved it by manually set the umi version number to the one which is requested by @metaplex-foundation/mpl-token-metadata.

like so: npm i @solana/web3.js @metaplex-foundation/umi@0.8.10 @metaplex-foundation/umi-bundle-defaults@0.8.10 @metaplex-foundation/mpl-token-metadata

now i wonder if this is better then forcing @metaplex-foundation/mpl-token-metadata to use the latest umi version. like which is the preferred way of handling this ?

lorisleiva commented 5 months ago

@danenbm @blockiosaurus Could you just change that line

https://github.com/metaplex-foundation/mpl-token-metadata/blob/2d967e76a71b14a153ea5bc3613eb55b136fac90/clients/js/package.json#L28

to this:

"@metaplex-foundation/umi": ">= 0.8.2 <1"

And then trigger a new patch update on CI?

That way, it should be compatible with all versions of Umi below v1.

You'll need to do the same with all mpl-* clients like mpl-toolbox, mpl-candy-machine, etc.

danenbm commented 5 months ago

Published fix in https://www.npmjs.com/package/@metaplex-foundation/mpl-token-metadata/v/3.1.3