I managed to pass the chromium download with a modification of the environment variables, but when I run my function, I need to access the following binary (/usr/bin/chromium-browser). and I get an error telling me that: no executable was found.
Here is the code:
const puppeteer = require('puppeteer');
module.exports = async function (req, res) {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://apple.com');
await page.screenshot({path: 'example.png'});
await browser.close();
res.send('Hello World!');
};
Is it possible to access files in this folder in an Appwrite function? If yes how?
Here is the complete error
Error: Tried to find the browser at the configured path (/usr/bin/chromium-browser), but no executable was found.
at ChromeLauncher.resolveExecutablePath (/usr/code-start/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:98:23)
at ChromeLauncher.executablePath (/usr/code-start/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:166:25)
at ChromeLauncher.launch (/usr/code-start/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:70:37)
at async module.exports (/usr/code-start/src/index.js:5:21)
at async /usr/local/src/server.js:68:13
Puppeteer requires an operating system dependency which isn't supported at the moment. You might want to 👍 this issue to upvote the feature request.