question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"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 issue

Describe 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:

image

(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:closed
  • Created 10 months ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
benmccanncommented, Nov 28, 2022

The reason it’s using esbuild is 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-netlify will only use esbuild if you either set that option in netlify.toml or set edge: true in the adapter options

0reactions
sw-yxcommented, Nov 28, 2022

ahh 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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found