Skip to content

adapter-netlify - ReferenceError - Headers is not defined #11536

@secondl1ght

Description

@secondl1ght

Describe the bug

When deploying to Netlify I am receiving the following error in production:

image

It appears to be coming from this to_request function here:

headers: new Headers(headers)

Reproduction

I have a few sites deployed with SvelteKit and Netlify but only one of them is throwing this error for some reason, even though they are all on the same versions. This is the site causing the issue: https://github.com/secondl1ght/portfolio-v2/tree/6299ee1e190ad0f7107f1721bd9686470cba4aca

Logs

No response

System Info

Note: The following is my local env system info and not what is running on the Netlify server.

  System:
    OS: Linux 5.15 Zorin OS 16.3
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Memory: 11.04 GB / 31.19 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
  Browsers:
    Brave Browser: 120.1.61.114
  npmPackages:
    @sveltejs/adapter-auto: ^3.1.0 => 3.1.0 
    @sveltejs/kit: ^2.0.6 => 2.0.6 
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.1 
    svelte: ^4.2.8 => 4.2.8 
    vite: ^5.0.11 => 5.0.11

Severity

blocking all usage of SvelteKit

Additional Information

NOTE: This happened when I upgraded to SK V2 - previously I was not getting this error in prod.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions