Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install latest langchain js package #2673

Closed
drobnikj opened this issue Sep 19, 2023 · 9 comments
Closed

Cannot install latest langchain js package #2673

drobnikj opened this issue Sep 19, 2023 · 9 comments
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature

Comments

@drobnikj
Copy link

I cannot install the latest version because of the dependency tree.

npm install langchain

ends up with the error

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/cohere-ai
npm ERR!   peerOptional cohere-ai@"^5.1.0" from [email protected]
npm ERR!   node_modules/chromadb
npm ERR!     peerOptional chromadb@"*" from [email protected]
npm ERR!     node_modules/langchain
npm ERR!       langchain@"*" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional cohere-ai@">=6.0.0" from [email protected]
npm ERR! node_modules/langchain
npm ERR!   langchain@"*" 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.
npm ERR! 
npm ERR! 

node js:
v18.15.0
npm:
9.5.0

@dosubot dosubot bot added the auto:bug Related to a bug, vulnerability, unexpected error with an existing feature label Sep 19, 2023
@dosubot
Copy link

dosubot bot commented Sep 19, 2023

🤖

Hello,

The error you're encountering seems to be due to a mismatch in the version of cohere-ai that langchain is dependent on. The error message suggests that langchain is looking for cohere-ai version >=6.0.0, but version 5.1.0 is currently installed in your project.

Here's a potential solution based on similar issues that were resolved in the langchainjs repository:

  1. Uninstall the current version of cohere-ai in your project:
npm uninstall cohere-ai
  1. Install the version of cohere-ai required by langchain:
npm install [email protected]
  1. Uninstall the current version of langchain in your project:
npm uninstall langchain
  1. Install the new version of langchain:
npm install langchain

If the issue persists, it might be due to other conflicting dependencies in your project. In this case, you might need to update your dependencies to the versions required by langchain.

Please note that the actual package names for langchain and cohere-ai might be different, so make sure to use the correct names when adding them to your dependencies.

If you're still encountering issues after trying these steps, please provide more information about your project setup, such as your Node.js version, npm version, and the contents of your package.json file.

I hope this helps! Let me know if you have any other questions.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@drobnikj
Copy link
Author

This commit breaks chroma-core/chroma@9e05cb3

Can you check @tazarov it here?

@drobnikj
Copy link
Author

I found the fix is on the way chroma-core/chroma#1156 👍

@tazarov
Copy link

tazarov commented Sep 19, 2023

@drobnikj, sorry, I was working late last night, and I did intend to include Cohere 6.x, but for some reason, that slipped. Apologies for the inconvenience :). We're working on a set of tests to validate ecosystem impacts, so hopefully, this is the "last" of these problems :)

@Santy1422
Copy link

@drobnikj, sorry, I was working late last night, and I did intend to include Cohere 6.x, but for some reason, that slipped. Apologies for the inconvenience :). We're working on a set of tests to validate ecosystem impacts, so hopefully, this is the "last" of these problems :)

Please, with each update the same thing happens, what version of Langchain should we put now?

@jacoblee93
Copy link
Collaborator

jacoblee93 commented Sep 19, 2023

I think we should also make all our peer deps either * or >= going forwards - I was hoping doing this for Chroma would prevent issues like this.

@drobnikj for now you can also run npm install langchain --with-legacy-peer-deps or just use yarn/pnpm who have saner defaults for this.

@jacoblee93
Copy link
Collaborator

For now @tazarov please release another Chroma version ASAP!

@tazarov
Copy link

tazarov commented Sep 19, 2023

@jacoblee93, new version's up, mind giving it a go? https://www.npmjs.com/package/chromadb

@jacoblee93
Copy link
Collaborator

Seems good, thank you!

Hopefully this will be the last time this pops up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants