Closed kethzi-gilbert closed 10 months ago
I am seeing the same issue in Vue/Nuxt3.
Same error here
@kethzi-gilbert Did you try https://www.storyblok.com/faq/headers-not-defined-storyblok-sdk ?
@kethzi-gilbert @SebbeJohansson @thomas-ef has any of you tried what @henrykuijpers shared? Did it work?
I have not tested, but Im pretty sure I was running nodejs 18 so I shouldn't have to do the polymorph. But as I said, I haven't tested it in a long time. Might be that I was running it weirdly or something. Nuxt3 should be working fine now.
I observe an error when I create a AWS Lambda function which fetches stories data from a storyblok space using Storyblok API Client. This lambda is triggered using an API on AWS API Gateway. I receive the error "ReferenceError: Headers is not defined" (shown in the screenshot below). This error is observed only when i use "@storyblok/js" version 2.1.0. When i downgrade the library version to 1.8.5, i don't see this error.
Expected Behavior
Should be able to fetch the stories from the API in the lambda function.
Current Behavior
I receive the below error
The lambda Handler code is as below