langchain-ai / langchainjs

🦜🔗 Build context-aware reasoning applications 🦜🔗
https://js.langchain.com/docs/
MIT License
12.55k stars 2.14k forks source link

Upgrade (or Relax) mongodb Dependency Version in @langchain/community to Align with Latest Requirements #6563

Open SantoshKumarRavi opened 2 months ago

SantoshKumarRavi commented 2 months ago

Checked other resources

Example Code

Steps to Reproduce:

Error Message and Stack Trace (if applicable)

npm i @langchain/community pdf-parse npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: hana-server@41.0.0 npm ERR! Found: mongodb@6.7.0 npm ERR! node_modules/mongodb npm ERR! mongodb@"^6.3.0" from @langchain/mongodb@0.0.1 npm ERR! node_modules/@langchain/mongodb npm ERR! @langchain/mongodb@"^0.0.1" from the root project npm ERR! peerOptional mongodb@">=5.2.0" from langchain@0.1.36 npm ERR! node_modules/langchain npm ERR! langchain@"^0.1.36" from the root project npm ERR! 2 more (@langchain/community, mongoose) npm ERR! npm ERR! Could not resolve dependency: npm ERR! @langchain/community@"" from the root project npm ERR! npm ERR! Conflicting peer dependency: mongodb@5.9.2 npm ERR! node_modules/mongodb npm ERR! peerOptional mongodb@"^5.8.0" from typeorm@0.3.20 npm ERR! node_modules/typeorm npm ERR! peerOptional typeorm@"^0.3.20" from @langchain/community@0.2.28 npm ERR! node_modules/@langchain/community npm ERR! @langchain/community@"" from the root project npm ERR! peerOptional typeorm@"^0.3.12" from langchain@0.1.37 npm ERR! node_modules/langchain npm ERR! langchain@"^0.1.36" from the root project npm ERR! 1 more (@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.

Description

We are encountering a dependency conflict in our project due to a mismatch in the mongodb version required by the @langchain/community package. Our project requires mongodb@^6.7.0, but the @langchain/community package specifies a peer dependency on mongodb@^5.9.2. This mismatch leads to npm installation errors, preventing us from setting up our project.

Proposed Solution:

Upgrade the mongodb dependency in the @langchain/community package to align with the latest version required by other packages (i.e., mongodb@^6.7.0). This will resolve the dependency conflict and allow for smooth project setup.

Impact:

This issue blocks our project setup and development, requiring us to use workarounds like --legacy-peer-deps, which could lead to further issues down the line.

System Info

Node.js: v20.10.0 npm: v10.2.3 OS: Windows 10 Pro

SantoshKumarRavi commented 1 month ago

@choonkeat i am not sure that i am tagging correct or not. can u fix this issue ?