Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(build): keep the image build working under @puppeteer/browsers 3
Yudhi Armyndharis097bd2708f32
diff --git a/Dockerfile b/Dockerfileindex 30a19d919..c398e5127 100644--- a/Dockerfile+++ b/Dockerfile@@ -39,7 +39,10 @@ COPY scripts/postinstall.js ./scripts/# variable, so docker-compose.yml's `NODE_ENV=${NODE_ENV:-production}` leaks NODE_ENV=production# into this stage and a bare `npm ci` would skip @nestjs/cli → `sh: 1: nest: not found` (exit 127).# (docker-compose.dev.yml hardcodes NODE_ENV=development, which is why the dev build never hit this.)-RUN npm ci --include=dev+# This stage only builds dist/ and the dashboard SPA and never launches a browser; the production+# stage downloads Chrome explicitly. Skip the Puppeteer postinstall download so @puppeteer/browsers 3+# does not try to extract a zip here, where no archiver is installed.+RUN PUPPETEER_SKIP_DOWNLOAD=true npm ci --include=dev# Copy source codeCOPY . .diff --git a/package-lock.json b/package-lock.jsonindex 40940730e..e3866eaa3 100644--- a/package-lock.json+++ b/package-lock.json@@ -40,6 +40,7 @@"https-proxy-agent": "^9.1.0","ioredis": "^6.0.0","pg": "^8.23.0",+ "puppeteer": "24.38.0","qrcode": "^1.5.4","reflect-metadata": "^0.2.2","rxjs": "^7.8.1",@@ -74,7 +75,6 @@"globals": "^17.11.0","jest": "^30.5.0","prettier": "^3.9.6",- "puppeteer-core": "24.38.0","supertest": "^7.0.0","ts-jest": "^29.4.12","ts-node": "^10.9.2",@@ -11956,6 +11956,27 @@"node": ">=6"}},+ "node_modules/puppeteer": {+ "version": "24.38.0",+ "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.38.0.tgz",+ "integrity": "sha512-abnJOBVoL9PQTLKSbYGm9mjNFyIPaTVj77J/6cS370dIQtcZMpx8wyZoAuBzR71Aoon6yvI71NEVFUsl3JU82g==",+ "hasInstallScript": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@puppeteer/browsers": "2.13.0",+ "chromium-bidi": "14.0.0",+ "cosmiconfig": "^9.0.0",+ "devtools-protocol": "0.0.1581282",+ "puppeteer-core": "24.38.0",+ "typed-query-selector": "^2.12.1"+ },+ "bin": {+ "puppeteer": "lib/cjs/puppeteer/node/cli.js"+ },+ "engines": {+ "node": ">=18"+ }+ },"node_modules/puppeteer-core": {"version": "24.38.0","resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.38.0.tgz",@@ -11974,6 +11995,32 @@"node": ">=18"}},+ "node_modules/puppeteer/node_modules/cosmiconfig": {+ "version": "9.0.2",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.2.tgz",+ "integrity": "sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg==",+ "license": "MIT",+ "dependencies": {+ "env-paths": "^2.2.1",+ "import-fresh": "^3.3.0",+ "js-yaml": "^4.1.0",+ "parse-json": "^5.2.0"+ },+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/d-fischer"+ },+ "peerDependencies": {+ "typescript": ">=4.9.5"+ },+ "peerDependenciesMeta": {+ "typescript": {+ "optional": true+ }+ }+ },"node_modules/pure-rand": {"version": "7.0.1","resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz",@@ -14636,32 +14683,6 @@"node": ">= 14"}},- "node_modules/whatsapp-web.js/node_modules/cosmiconfig": {- "version": "9.0.2",- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.2.tgz",- "integrity": "sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg==",- "license": "MIT",- "dependencies": {- "env-paths": "^2.2.1",- "import-fresh": "^3.3.0",- "js-yaml": "^4.1.0",- "parse-json": "^5.2.0"- },- "engines": {- "node": ">=14"- },- "funding": {- "url": "https://github.com/sponsors/d-fischer"- },- "peerDependencies": {- "typescript": ">=4.9.5"- },- "peerDependenciesMeta": {- "typescript": {- "optional": true- }- }- },"node_modules/whatsapp-web.js/node_modules/crc32-stream": {"version": "6.0.0","resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz",@@ -14716,27 +14737,6 @@"node": ">=10"}},- "node_modules/whatsapp-web.js/node_modules/puppeteer": {- "version": "24.38.0",- "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.38.0.tgz",- "integrity": "sha512-abnJOBVoL9PQTLKSbYGm9mjNFyIPaTVj77J/6cS370dIQtcZMpx8wyZoAuBzR71Aoon6yvI71NEVFUsl3JU82g==",- "hasInstallScript": true,- "license": "Apache-2.0",- "dependencies": {- "@puppeteer/browsers": "2.13.0",- "chromium-bidi": "14.0.0",- "cosmiconfig": "^9.0.0",- "devtools-protocol": "0.0.1581282",- "puppeteer-core": "24.38.0",- "typed-query-selector": "^2.12.1"- },- "bin": {- "puppeteer": "lib/cjs/puppeteer/node/cli.js"- },- "engines": {- "node": ">=18"- }- },"node_modules/whatsapp-web.js/node_modules/readdir-glob": {"version": "1.1.3","resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz",diff --git a/package.json b/package.jsonindex f9fa1e260..1f478c4f1 100644--- a/package.json+++ b/package.json@@ -97,6 +97,7 @@"https-proxy-agent": "^9.1.0","ioredis": "^6.0.0","pg": "^8.23.0",+ "puppeteer": "24.38.0","qrcode": "^1.5.4","reflect-metadata": "^0.2.2","rxjs": "^7.8.1",@@ -131,7 +132,6 @@"globals": "^17.11.0","jest": "^30.5.0","prettier": "^3.9.6",- "puppeteer-core": "24.38.0","supertest": "^7.0.0","ts-jest": "^29.4.12","ts-node": "^10.9.2",