keko92
CDCloudflare Developers
•Created by keko92 on 7/23/2023 in #pages-help
Unable to use @aws-sdk/client-s3 in Nuxt 3 Pages
I have a new Nuxt 3.6.1 application deployed with cloudflare-pages and everything works as expected.
When using @aws-sdk/client-s3 and creating a new s3client the deployment to cloudflare-pages fails after the build and upload is already completed:
✨ Upload complete!
Success: Assets published!
Error: Failed to publish your Function. Got error: Uncaught TypeError: Cannot convert object to primitive value
at functionsWorker-0.18438961492783257.js:20415:77 in e2.defaultUserAgent
at functionsWorker-0.18438961492783257.js:22815:340 in Ry.getRuntimeConfig
at functionsWorker-0.18438961492783257.js:22820:44 in S3Client
at functionsWorker-0.18438961492783257.js:30336:1
Building the application on my local machine works. I also made sure to use the same nitro preset and node version 18.17.09 replies
CDCloudflare Developers
•Created by keko92 on 6/9/2023 in #pages-help
Nuxt 3 / jsonwebtoken / Error: Failed to publish your Function
I am using Nuxt 3 with Cloudflare Pages. The build works fine and it correctly uses the nitro-preset "cloudflare-pages". I am also getting a "Success: Assets published!" message but after that it fails with the following error message: Error: Failed to publish your Function. Got error: Uncaught TypeError: Object prototype may only be an Object or null: undefined
The error only occurs when I am using the verfiy/sign functions provided by jsonwebtoken. When replacing the jsonwebtoken package with @tsndr/cloudflare-worker-jwt it works as expected.
1 replies