Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

chore: define puppeteer and playwright as optional peer dependencies (#1056)

Martin Adámek334e54083709
diff --git a/package.json b/package.json
index bb81d0684..fc2ced91d 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,6 @@
"@types/cheerio": "^0.22.28",
"@types/domhandler": "^2.4.1",
"@types/node": "^14",
- "@types/puppeteer": "^5.4.3",
"@types/socket.io": "^2.1.13",
"@types/tough-cookie": "^4.0.0",
"apify-client": "^1.2.4",
@@ -82,6 +81,18 @@
"underscore": "^1.13.0",
"ws": "^7.4.6"
},
+ "peerDependencies": {
+ "playwright": "^1.11.0",
+ "puppeteer": "^9.0.0"
+ },
+ "peerDependenciesMeta": {
+ "playwright": {
+ "optional": true
+ },
+ "puppeteer": {
+ "optional": true
+ }
+ },
"devDependencies": {
"@apify/eslint-config": "^0.1.3",
"@babel/cli": "^7.11.6",