-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
"langchain": "^0.1.2", Cannot find module 'langchain/llms', #4019
Comments
🤖 Hello @zwilch! I'm Dosu, your friendly bot here to assist you with bug troubleshooting, answering questions, and guiding you on becoming a fantastic contributor while we're waiting for a human maintainer. I'm ready to help you out with your langchainjs issue. Let's dive into it together! Based on the context provided, it seems like you're encountering an issue with importing the The error message "Cannot find module 'langchain/llms' or its corresponding type declarations" indicates that the module 'langchain/llms' cannot be found in your project. This could be due to a few reasons:
To fix this issue, you should:
import { OpenAI } from "langchain/llms/openai"; If you've done all of these steps and are still encountering the error, there may be a deeper issue with your project configuration or with the langchainjs library itself. As for the exact structure of the 'langchain/llms' module in the langchainjs version 0.1.2, I wasn't able to find an answer within the repository. The answer may be available elsewhere or I could have missed it. I hope this helps! If you have any other questions or need further clarification, feel free to ask. -Dosu SourcesThis 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. |
Thank you, this |
Glad Dosu solved it, |
node -v v20.10.0
npm -v 10.2.5
followed this simple tutorial: https://langchainers.hashnode.dev/getting-started-with-langchainjs
Error:
package.json
The text was updated successfully, but these errors were encountered: