"TypeError: Request3 is not a constructor" upgrading `adapter-netlify` from 76 to 77 - Resolved: esbuild does not work on Netlify, do not enable in netlify.toml or use netlify edge
See original GitHub issueDescribe the bug
I upgraded my SK version from 510 to 561 and adapter from
72 to 89 (https://github.com/sw-yx/swyxkit/commit/ffdd14921ed058961d1b638735077fb26bbf8385) and it started reporting a TypeError: Request3 is not a constructor error:

(you can see the preview here https://app.netlify.com/sites/swyxkit/functions/render?scope=deploypreview:136) causing all renders to 500.
this doesnt happen in dev, only prod.
Reproduction
https://github.com/sw-yx/swyxkit/commit/ffdd14921ed058961d1b638735077fb26bbf8385
i am debugging in https://github.com/sw-yx/swyxkit/pull/136
Logs
Nov 28, 12:38:24 PM: b5dfe38e ERROR TypeError: Request3 is not a constructor
at file:///var/task/.netlify/functions-internal/render.mjs:24273:22
at new Promise (<anonymous>)
at fetch3 (file:///var/task/.netlify/functions-internal/render.mjs:24272:10)
at listContent (file:///var/task/.netlify/functions-internal/render.mjs:36534:23)
at GET2 (file:///var/task/.netlify/functions-internal/render.mjs:36737:23)
at render_endpoint (file:///var/task/.netlify/functions-internal/render.mjs:44730:29)
at resolve (file:///var/task/.netlify/functions-internal/render.mjs:46610:29)
at async respond (file:///var/task/.netlify/functions-internal/render.mjs:46520:23)
at async fetch (file:///var/task/.netlify/functions-internal/render.mjs:46370:21)
at async Object.fetch (file:///var/task/.netlify/functions-internal/render.mjs:46302:12)
System Info
"@histoire/plugin-svelte": "^0.11.7",
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "1.0.0-next.89",
"@sveltejs/kit": "^1.0.0-next.561",
"@tailwindcss/typography": "^0.5.8",
"@typescript-eslint/eslint-plugin": "^5.44.0",
"@typescript-eslint/parser": "^5.44.0",
"autoprefixer": "^10.4.13",
"concurrently": "^7.6.0",
"eslint": "^8.28.0",
Severity
annoyance
Additional Information
filing for others to find in future as i try to isolate the problem.
i am debugging in https://github.com/sw-yx/swyxkit/pull/136
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Netlify briefly broke esbuild builds, causing "Dynamic require ...
Describe the bug as part of regular maintenance for swyxkit i upgraded the deps as per the title and now everything is throwing...
Read more >Issue with deploying on Netlify UI - Support
Hello netlify community, I manage to successfully build and deploy my netlify app through netlify cli. However, when I try to do it...
Read more >Setting Up Edge Functions Error! - Netlify Support Forums
My Website will deploy but shows up blank at my development URL. I've been trying to debug this for 3 days now and...
Read more >Syntax Error during deploy --build command step bundling ...
Hi, i am experiencing an issue using netlify-cli to build and ... A consideration, my functions are standard netlify functions and not edge, ......
Read more >[Support Guide] Frequently encountered problems during builds
Don't forget to switch it off after you have found the problem, as it does slow down your build and may use up...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The reason it’s using
esbuildis this line:https://github.com/sw-yx/swyxkit/blob/ffdd14921ed058961d1b638735077fb26bbf8385/netlify.toml#L8
I recommend you remove that if you’re having difficulty with
esbuild.adatper-netlifywill only useesbuildif you either set that option innetlify.tomlor setedge: truein the adapter optionsahh thanks. its not yet 100% working for me (https://deploy-preview-138--swyxkit.netlify.app/welcome is mysteriously 404ing) but still pretty good! thank you!