-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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/aws has broken dependency #6049
Comments
Hello, @s-natsubori! I'm here to help you with any questions or issues you may have. If you need assistance with bug fixes, code-related questions, or becoming a contributor, feel free to ask. The unmet peer dependencies and build errors you're encountering with Here are the steps to fix the package versions and resolve the unmet peer dependencies:
Here is an example of how you can update your {
"dependencies": {
"@langchain/aws": "^0.0.1",
"@langchain/core": "^0.2.9",
"langchain": "^0.2.9",
"@aws-sdk/client-sts": "^3.614.0",
"@aws-sdk/client-sso-oidc": "^3.614.0",
"@smithy/shared-ini-file-loader": "^3.0.0"
},
"resolutions": {
"@aws-sdk/client-sts": "^3.614.0",
"@aws-sdk/client-sso-oidc": "^3.614.0",
"@smithy/shared-ini-file-loader": "^3.0.0"
}
} Additionally, ensure that all LangChain packages depend on the same instance of {
"name": "your-project",
"version": "0.0.0",
"dependencies": {
"@langchain/aws": "^0.0.1",
"langchain": "0.0.207"
},
"resolutions": {
"@langchain/core": "0.1.5"
},
"overrides": {
"@langchain/core": "0.1.5"
},
"pnpm": {
"overrides": {
"@langchain/core": "0.1.5"
}
}
} This should resolve the unmet peer dependencies and the build errors by ensuring that all related packages are using compatible versions. If the issue persists, you may need to check for any additional updates or compatibility issues with the specific versions of the packages you are using. |
I try {
"dependencies": {
"@langchain/aws": "^0.0.1",
"@langchain/core": "^0.2.9",
"langchain": "^0.2.9",
"@aws-sdk/client-sts": "^3.614.0",
"@aws-sdk/client-sso-oidc": "^3.614.0",
"@smithy/shared-ini-file-loader": "^3.0.0"
},
"resolutions": {
"@aws-sdk/client-sts": "^3.614.0",
"@aws-sdk/client-sso-oidc": "^3.614.0",
"@smithy/shared-ini-file-loader": "^3.0.0"
}
}
install warning is resolved. I did not try |
CC @bracesproul |
Hey @s-natsubori I'm unable to reproduce the build error with the code sample you provided: import { ChatBedrockConverse } from "@langchain/aws";
const model = new ChatBedrockConverse({
model: "anthropic.claude-3-5-sonnet-20240620-v1:0",
region: "us-east-1",
credentials: {
secretAccessKey: "my-secret-key",
accessKeyId: "my-access-key-id",
},
}); Could you provide a public github repo which will allow be to reproduce the issue? |
@bracesproul Hi Brace, I am facing the same issue when adding @langchain/aws to a project that uses esbuild. To reproduce you can clone and build this project: https://github.com/massi-ang/obsidian-textgenerator-plugin/tree/feat_bedrock. Note the branch in not |
Edit: confirmed that the issue was with file extensions being omitted from the es build of @bracesproul Similar error when importing from in a vite-based build:
Problem appears in an ESM environment. I'm not 100%, but I think that the culprit is the fact that there are no extensions for the files imported in
In ESM, file extensions are mandatory, so this should be:
|
Hi, @s-natsubori. I'm Dosu, and I'm helping the LangChain JS team manage their backlog. I'm marking this issue as stale. Issue Summary:
Next Steps:
Thank you for your understanding and contribution! |
Commenting to keep this open, @DanielOrtel any updates? I think you linked the wrong issue on AWS. |
Yeah, I linked the wrong one appearantly: smithy-lang/smithy-typescript#1437, same issue with AWS sdk: aws/aws-sdk-js-v3#3622. The update so far is that they're not willing to fix it, due to it requiring a larger rewrite of their build process |
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
yarn install raise warning
and build dead with error
Description
Why @langchain/aws has unmet peer dependency?
Can I solve this fix some package version???
System Info
platform :windows
Node: v20.9.0
yarn: 1.22.19
The text was updated successfully, but these errors were encountered: