From 2e2c828c7e24a03c56864a2b0ffe2396af739d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 19:53:44 +0200 Subject: [PATCH] fix(linkedom-crawler): declare cheerio as a dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `linkedom-crawler.ts` does `import * as cheerio from 'cheerio'`, but `cheerio` was not declared in `@crawlee/linkedom`'s dependencies. The package built/published fine because cheerio is hoisted to the crawlee monorepo root via other workspaces (`@crawlee/cheerio`, `@crawlee/utils`, `@crawlee/http`, etc.), so resolution always found it during dev. Downstream installs that don't pull any of those packages — e.g. an SDK that depends only on `crawlee` and re-exports `@crawlee/linkedom` through it — fail at runtime with `Cannot find package 'cheerio'` the moment Node resolves the import. Declaring cheerio explicitly makes the package self-contained. --- packages/linkedom-crawler/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/linkedom-crawler/package.json b/packages/linkedom-crawler/package.json index 3f8b237587f0..d508ebb4888e 100644 --- a/packages/linkedom-crawler/package.json +++ b/packages/linkedom-crawler/package.json @@ -52,6 +52,7 @@ "@crawlee/http": "workspace:*", "@crawlee/types": "workspace:*", "@crawlee/utils": "workspace:*", + "cheerio": "^1.0.0", "linkedom": "^0.18.10", "ow": "^2.0.0", "tslib": "^2.8.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0806ed572ed9..9c0f7ff73913 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -662,6 +662,9 @@ importers: '@crawlee/utils': specifier: workspace:* version: link:../utils + cheerio: + specifier: ^1.0.0 + version: 1.2.0 linkedom: specifier: ^0.18.10 version: 0.18.12