Hi all,
Is there a way to be able to run puppeter or phantomjs in appwrite functions?
When testing my function locally, both with puppeter and with the html-pdf extension that phantomjs uses, it works fine, but when I run it inside a function, it throws me an error.
An example of errors:
Phantomjs
Error: spawn /usr/code-start/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:480:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Puppeter
Error: Could not find Chromium (rev. 1108766). This can occur if either
1. you did not perform an installation before running the script (e.g. `npm install`) or
2. your cache path is incorrectly configured (which is: /root/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
at ChromeLauncher.resolveExecutablePath (/usr/code-start/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:127:27)
at ChromeLauncher.executablePath (/usr/code-start/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:207:25)
at ChromeLauncher.launch (/usr/code-start/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:93:37)
at async /usr/code-start/dist/models/invoice.js:174:33
Thanks in advance