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

npm install langchain chromadb openai not working #2617

Closed
ghostenginesio opened this issue Sep 13, 2023 · 5 comments
Closed

npm install langchain chromadb openai not working #2617

ghostenginesio opened this issue Sep 13, 2023 · 5 comments
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature

Comments

@ghostenginesio
Copy link

[Nodejs App]

Below command is not working

npm install langchain chromadb openai

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/openai
npm WARN   openai@"*" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional openai@"^3.0.0 | ^4.0.0" from [email protected]
npm WARN node_modules/chromadb
npm WARN   chromadb@"*" from the root project
npm WARN   1 more (langchain)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/openai
npm WARN   openai@"*" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional openai@"^3.0.0 | ^4.0.0" from [email protected]
npm WARN node_modules/chromadb
npm WARN   chromadb@"*" from the root project
npm WARN   1 more (langchain)
npm ERR! code ETARGET
npm ERR! notarget No matching version found for openai@^3.0.0 | ^4.0.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

Thanks for helping out!

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

dosubot bot commented Sep 13, 2023

🤖

Hello,

The error you're encountering seems to be due to a mismatch in the version of openai that chromadb and langchain are dependent on. The error message suggests that chromadb and langchain are looking for openai version ^3.0.0 or ^4.0.0, but version 4.6.0 is currently installed in your project.

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

  1. Uninstall the current version of openai in your project:
npm uninstall openai
  1. Install the version of openai required by chromadb and langchain:
npm install [email protected]
  1. Uninstall the current versions of chromadb and langchain in your project:
npm uninstall chromadb langchain
  1. Install the new versions of chromadb and langchain:
npm install chromadb 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 chromadb and langchain.

Please note that the actual package names for langchain, chromadb, and openai 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.

Best,
Dosu

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.

@leetharris
Copy link

Same problem. I have tried every version of OpenAI dependency. There's a fundamental issue with ChromaDB, OpenAI, Cohere, and langchain dependencies.

@jacoblee93
Copy link
Collaborator

Yeah openai@"^3.0.0 | ^4.0.0" isn't a valid resolution for npm

CC @jeffchuber could we patch this? It's been causing issues for some folks. You can use >=3.0.0 instead.

Screenshot 2023-09-13 at 10 08 37 AM

@jeffchuber
Copy link
Contributor

@jacoblee93 yes, fire away

@jacoblee93
Copy link
Collaborator

Opened chroma-core/chroma#1142 which should fix this longer-term when live!

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