Unable to resolve dependency tree error while trying to update langchain npm packages

I am trying to update langchain packages, my packages are as followed:

`npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/puppeteer
npm ERR!   peerOptional puppeteer@"^22.0.0" from @langchain/[email protected]
npm ERR!   node_modules/@langchain/community
npm ERR!     @langchain/community@"^0.2.21" from the root project
npm ERR!     peerOptional @langchain/community@"*" from [email protected]
npm ERR!     node_modules/langchain
npm ERR!       langchain@"^0.2.11" from the root project
npm ERR!       3 more (langfuse-langchain, @langchain/community, @getzep/zep-cloud)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional puppeteer@"^19.7.2" from [email protected]
npm ERR! node_modules/langchain
npm ERR!   langchain@"^0.2.11" from the root project
npm ERR!   node_modules/langfuse-langchain
npm ERR!     langfuse-langchain@"*" from the root project
npm ERR!   2 more (@langchain/community, @getzep/zep-cloud)
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.`

From the message, I think it's because of puppeteer conflict, so I tried uninstalling every single one of the packages and re-install them, I found out that the 3 packages that cause problems are:

I found some solutions:

Upvotes: 1

Views: 198

Answers (0)

Related Questions