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

langchain & @langchain/community using old deprecated puppeteer version #6225

Closed
5 tasks done
hro-mrjvs opened this issue Jul 26, 2024 · 1 comment · Fixed by #6230
Closed
5 tasks done

langchain & @langchain/community using old deprecated puppeteer version #6225

hro-mrjvs opened this issue Jul 26, 2024 · 1 comment · Fixed by #6230
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature

Comments

@hro-mrjvs
Copy link

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

# run in new folder
pnpm init
pnpm i langchain @langchain/community

pnpm i puppeteer@19
#  WARN  deprecated puppeteer@19.11.1: < 22.8.2 is no longer supported

pnpm i puppeteer@latest
# WARN  Issues with peer dependencies found
# .
# ├─┬ langchain 0.2.11
# │ └── ✕ unmet peer puppeteer@^19.7.2: found 22.14.0
# └─┬ @langchain/community 0.2.20
#   └── ✕ unmet peer puppeteer@^19.7.2: found 22.14.0

Error Message and Stack Trace (if applicable)

WARN  deprecated puppeteer@19.11.1: < 22.8.2 is no longer supported

or

WARN  Issues with peer dependencies found
.
├─┬ langchain 0.2.11
│ └── ✕ unmet peer puppeteer@^19.7.2: found 22.14.0
└─┬ @langchain/community 0.2.20
  └── ✕ unmet peer puppeteer@^19.7.2: found 22.14.0

Description

The package langchain and @langchain/community have an optional peer dependencies on a deprecated puppeteer version.

langchain & @langchain/community depends on puppeteer@^19.7.2
puppeteer supported versions are 22.8.2 or higher.

suggested fix: either the peer dependency either gets all versions: ^19.7.2 || ^20.0.0 || ^21.0.0 || ^22.0.0 (there have been no breaking changes that langchain makes use of internally) or simply update to ^22.0.0

System Info

@langchain/community 0.2.20
langchain 0.2.11
pnpm 9.2.0
node v20.1.0
MacOS

@dosubot dosubot bot added the auto:bug Related to a bug, vulnerability, unexpected error with an existing feature label Jul 26, 2024
Copy link

dosubot bot commented Jul 26, 2024

Hey @hro-mrjvs! 👋 I'm here to help you with bugs, questions, and becoming a contributor. Let's squash those bugs together while we wait for a human maintainer.

To address the issue with the deprecated Puppeteer version in the langchain and @langchain/community packages, you can update the peerDependencies in the package.json files of both packages. Here are the steps:

  1. Update langchain package:
    Modify the peerDependencies section in the package.json file of the langchain package to include the newer versions of Puppeteer:

    "peerDependencies": {
      "puppeteer": "^19.7.2 || ^20.0.0 || ^21.0.0 || ^22.0.0"
    }

    Alternatively, if you prefer to update it to ^22.0.0 only:

    "peerDependencies": {
      "puppeteer": "^22.0.0"
    }
  2. Update @langchain/community package:
    Similarly, modify the peerDependencies section in the package.json file of the @langchain/community package:

    "peerDependencies": {
      "puppeteer": "^19.7.2 || ^20.0.0 || ^21.0.0 || ^22.0.0"
    }

    Or, if you prefer to update it to ^22.0.0 only:

    "peerDependencies": {
      "puppeteer": "^22.0.0"
    }

Here is an example of how the peerDependencies section might look in the langchain package:

"peerDependencies": {
  "@aws-sdk/client-s3": "^3.310.0",
  "@aws-sdk/client-sagemaker-runtime": "^3.310.0",
  "@aws-sdk/client-sfn": "^3.310.0",
  "@aws-sdk/credential-provider-node": "^3.388.0",
  "@azure/storage-blob": "^12.15.0",
  "@browserbasehq/sdk": "*",
  "@gomomento/sdk": "^1.51.1",
  "@gomomento/sdk-core": "^1.51.1",
  "@gomomento/sdk-web": "^1.51.1",
  "@mendable/firecrawl-js": "^0.0.13",
  "@notionhq/client": "^2.2.10",
  "@pinecone-database/pinecone": "*",
  "@supabase/supabase-js": "^2.10.0",
  "@vercel/kv": "^0.2.3",
  "@xata.io/client": "^0.28.0",
  "apify-client": "^2.7.1",
  "assemblyai": "^4.0.0",
  "axios": "*",
  "cheerio": "^1.0.0-rc.12",
  "chromadb": "*",
  "convex": "^1.3.1",
  "couchbase": "^4.3.0",
  "d3-dsv": "^2.0.0",
  "epub2": "^3.0.1",
  "fast-xml-parser": "*",
  "handlebars": "^4.7.8",
  "html-to-text": "^9.0.5",
  "ignore": "^5.2.0",
  "ioredis": "^5.3.2",
  "jsdom": "*",
  "mammoth": "^1.6.0",
  "mongodb": ">=5.2.0",
  "node-llama-cpp": "*",
  "notion-to-md": "^3.1.0",
  "officeparser": "^4.0.4",
  "pdf-parse": "1.1.1",
  "peggy": "^3.0.2",
  "playwright": "^1.32.1",
  "puppeteer": "^19.7.2 || ^20.0.0 || ^21.0.0 || ^22.0.0",
  "pyodide": "^0.24.1",
  "redis": "^4.6.4",
  "sonix-speech-recognition": "^2.1.1",
  "srt-parser-2": "^1.2.3",
  "typeorm": "^0.3.20",
  "weaviate-ts-client": "*",
  "web-auth-library": "^1.0.3",
  "ws": "^8.14.2",
  "youtube-transcript": "^1.0.6",
  "youtubei.js": "^9.1.0"
}

Ensure you replicate similar changes in the @langchain/community package's package.json file as well [1][2].

To continue talking to Dosu, mention @dosu.

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

Successfully merging a pull request may close this issue.

1 participant