Browse Source

Fix failing "npm install" due to missing Chromium

When running on an AMD64 container (phpfpm), `npm install` would fail
when installing puppeteer with the following error:

```
npm ERR! code 1
npm ERR! path /var/www/html/node_modules/puppeteer
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! The chromium binary is not available for arm64.
npm ERR! If you are on Ubuntu, you can install with:
npm ERR!
npm ERR!  sudo apt install chromium
npm ERR!
npm ERR!
npm ERR!  sudo apt install chromium-browser
npm ERR!
npm ERR! /var/www/html/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115
npm ERR!                     throw new Error();
npm ERR!                     ^
npm ERR!
npm ERR! Error
npm ERR!     at /var/www/html/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115:27
npm ERR!     at FSReqCallback.oncomplete (node:fs:204:21)
npm ERR!
npm ERR! Node.js v18.2.0

npm ERR! A complete log of this run can be found in:
npm ERR!     /var/www/.npm/_logs/2023-01-12T17_21_13_081Z-debug-0.log
```
Dan Church 2 years ago
parent
commit
a6c002c3b6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      compose/env/phpfpm.env

+ 1 - 0
compose/env/phpfpm.env

@@ -2,3 +2,4 @@ BLACKFIRE_CLIENT_ID=
 BLACKFIRE_CLIENT_TOKEN=
 COMPOSER_DISABLE_XDEBUG_WARN=1
 PHP_CS_FIXER_IGNORE_ENV=1
+PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true