Skip to content

Conversation

@bizob2828
Copy link
Member

@bizob2828 bizob2828 commented May 28, 2024

Description

We have issues when running langchain tests when the version of @langchain/core differs from @langchain/[email protected].

/home/runner/work/node-newrelic/node-newrelic/test/versioned/langchain/tools.tap.js @langchain/[email protected] @langchain/[email protected] @langchain/[email protected] @elastic/[email protected]
stdout

---------------------------------------------------------------
stderr
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: @google-ai/[email protected]
npm error node_modules/@google-ai/generativelanguage
npm error   peerOptional @google-ai/generativelanguage@"^0.2.1" from [email protected]
npm error   node_modules/langchain
npm error     peerOptional langchain@"~0.1.19" from @getzep/[email protected]
npm error     node_modules/@getzep/zep-cloud
npm error       peerOptional @getzep/zep-cloud@"~1.0.0" from @langchain/[email protected]
npm error       node_modules/@langchain/community
npm error         @langchain/community@"0.2.3" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional @google-ai/generativelanguage@"^2.5.0" from @langchain/[email protected]
npm error node_modules/@langchain/community
npm error   @langchain/community@"0.2.3" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/runner/.npm/_logs/2024-05-28T16_50_37_812Z-eresolve-report.txt

npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2024-05-28T16_50_37_812Z-debug-0.log
Failed to execute npm install --no-save --no-package-lock --no-audit --no-fund @langchain/[email protected] @langchain/[email protected] @langchain/[email protected] @elastic/[email protected]

===============================================================
Versions executed

I worked around this by pinning a version of @langchain/community, elasticsearch in a separate test stanza. The library under test is @langchain/core so it'll be ok to pin the other versions until @langchain/core breaks with the pinned versions, which may or may happen in the future

How to Test

npm run versioned:internal langchain

…nd other tests. This is to avoid peer resolution of `@langchain/community` package that is being used to test the elasticsearch vectorstore
@bizob2828 bizob2828 added the dev:tests Indicates only changes to tests label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev:tests Indicates only changes to tests

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants