That error usually means you did not send a return statement with a statusCode.
Since you’re using Astro, this could also be an Astro bug as you don’t seem to be using Netlify Functions yourself, which would mean that Astro is building one for you.
Thanks for the log location, I have investigated this issue further, but without success.
Tried to replace dynamic import by static and at least this gave the following error in the browser:
Thanks a LOT.
I changed the whole build to npm and this solved the problem.
I had to do this both on netlify and locally, it was not enough just on netlify,
possibly due to the lock file (pnpm package lock has a different name as npm package lock).
Now this is working
Hi @norama! Thanks for coming back to the forums! Thank you for letting us know what helped you solve your problem! This will help other users who come across this post as they work to troubleshoot and debug their own work. We really appreciate this! Happy Building.