LayerZero-Labs / LayerZero-v2

Other
495 stars 312 forks source link

`@layerzerolabs/lz-evm-oapp-v2` uses dependency with outdated ethers@5 peer dependency #22

Open actuallymentor opened 4 months ago

actuallymentor commented 4 months ago

When installing @layerzerolabs/lz-evm-oapp-v2 with the latest hardhat, one encounters a peer dependency conflct.

It looks like layerzerolabs/lz-evm-oapp-v2 depends on @layerzerolabs/lz-evm-messagelib-v2, which depends on @eth-optimism/contracts@"^0.6.0, which depends on ethers@5.7.2.

While this error can be ignored with --legacy-peer-deps it is probably a good idea to fix the underlying dependencies or add this to a Known Issues section so as to not confuse/worry developers trying out the oApp contracts.

Dependency issue trace:

npm ERR! While resolving: hardhat-project@0.1.0
npm ERR! Found: ethers@6.10.0
npm ERR! node_modules/ethers
npm ERR!   peer ethers@"^6.1.0" from @nomicfoundation/hardhat-chai-matchers@2.0.4
npm ERR!   node_modules/@nomicfoundation/hardhat-chai-matchers
npm ERR!     peer @nomicfoundation/hardhat-chai-matchers@"^2.0.0" from @nomicfoundation/hardhat-toolbox@4.0.0
npm ERR!     node_modules/@nomicfoundation/hardhat-toolbox
npm ERR!       dev @nomicfoundation/hardhat-toolbox@"^4.0.0" from the root project
npm ERR!   peer ethers@"^6.1.0" from @nomicfoundation/hardhat-ethers@3.0.5
npm ERR!   node_modules/@nomicfoundation/hardhat-ethers
npm ERR!     peer @nomicfoundation/hardhat-ethers@"^3.0.0" from @nomicfoundation/hardhat-chai-matchers@2.0.4
npm ERR!     node_modules/@nomicfoundation/hardhat-chai-matchers
npm ERR!       peer @nomicfoundation/hardhat-chai-matchers@"^2.0.0" from @nomicfoundation/hardhat-toolbox@4.0.0
npm ERR!       node_modules/@nomicfoundation/hardhat-toolbox
npm ERR!         dev @nomicfoundation/hardhat-toolbox@"^4.0.0" from the root project
npm ERR!     peer @nomicfoundation/hardhat-ethers@"^3.0.0" from @nomicfoundation/hardhat-toolbox@4.0.0
npm ERR!     node_modules/@nomicfoundation/hardhat-toolbox
npm ERR!       dev @nomicfoundation/hardhat-toolbox@"^4.0.0" from the root project
npm ERR!   3 more (@nomicfoundation/hardhat-toolbox, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @layerzerolabs/lz-evm-oapp-v2@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: ethers@5.7.2
npm ERR! node_modules/ethers
npm ERR!   peer ethers@"^5" from @eth-optimism/contracts@0.6.0
npm ERR!   node_modules/@eth-optimism/contracts
npm ERR!     peer @eth-optimism/contracts@"^0.6.0" from @layerzerolabs/lz-evm-messagelib-v2@2.0.25
npm ERR!     node_modules/@layerzerolabs/lz-evm-messagelib-v2
npm ERR!       peer @layerzerolabs/lz-evm-messagelib-v2@"^2.0.25" from @layerzerolabs/lz-evm-oapp-v2@2.0.25
npm ERR!       node_modules/@layerzerolabs/lz-evm-oapp-v2
npm ERR!         @layerzerolabs/lz-evm-oapp-v2@"*" from the root project
npm ERR!
Gbanks2230 commented 4 months ago

Good suggestion

lolipup009 commented 2 months ago

Find a new one.