Use {headless: 'shell'} in puppeteer to restore old behaviour

New headless needs a graphical environment, which won't work on
cms-www
This commit is contained in:
Adam Goldsmith 2024-03-28 12:21:23 -04:00
parent 56bbe84249
commit 89c63fc8df

View File

@ -4,7 +4,7 @@ import puppeteer from 'puppeteer';
const PORT = process.env.PORT || 1234;
const app = express();
const puppet_browser = await puppeteer.launch();
const puppet_browser = await puppeteer.launch({ headless: 'shell' });
app.get('/ipad.png', async (req, res) => {
const puppet_page = await puppet_browser.newPage();