Back

Nodejs Cloud function error

  • 0
  • Self Hosted
  • Flutter
  • Functions
frankenstein
29 Mar, 2024, 13:30

i created a nodejs cloud function for generating pdf invoice and send via email. im getting the following errors during execution TypeError: userFunction is not a function at execute (/usr/local/server/src/server.js:159:28) at action (/usr/local/server/src/server.js:174:33) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async /usr/local/server/src/server.js:10:9 and Multiple internal curl errors has occurred within the executor! Error Number: 111. Error Msg: Connection refused\nError Code: 500

TL;DR
Developers are encountering errors with a Node.js cloud function related to Puppetteer compatibility and function execution issues. The npm build logs indicate the mismatch in required Node version for Puppetteer packages. To address this, developers may need to lower the version of Puppetteer or update the Node version. Additionally, there are errors during the function execution related to 'userFunction' not being recognized and internal curl errors (Error Code 500).
D5
29 Mar, 2024, 13:33

What's the code for the function? Remember censoring sensitive content if ther's

D5
29 Mar, 2024, 13:33

And what's your SDK version and the Appwrite self-hosted version?

frankenstein
29 Mar, 2024, 13:34

1.4.8

frankenstein
29 Mar, 2024, 13:35

i got the build logs ```Preparing for build ... Building ... npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@puppeteer/browsers@2.2.0', npm WARN EBADENGINE required: { node: '>=18' }, npm WARN EBADENGINE current: { node: 'v16.16.0', npm: '8.11.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'puppeteer@22.6.1', npm WARN EBADENGINE required: { node: '>=18' }, npm WARN EBADENGINE current: { node: 'v16.16.0', npm: '8.11.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'puppeteer-core@22.6.1', npm WARN EBADENGINE required: { node: '>=18' }, npm WARN EBADENGINE current: { node: 'v16.16.0', npm: '8.11.0' } npm WARN EBADENGINE }

removed 24 packages, and audited 210 packages in 7s

23 packages are looking for funding run npm fund for details

2 moderate severity vulnerabilities

To address all issues (including breaking changes), run: npm audit fix --force

Run npm audit for details. Packing build ... Build finished.```

frankenstein
29 Mar, 2024, 13:36

do i have to lower the version of pupeteer to work on node 16?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more