Would it be possible to improve error handling for using edge runtime? #65810
tylersayshi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
It is very clear in the docs that native node apis are not supported.
My issue was that I had been opted into the edge runtime via the project template I was working off of. Then when I went to add a client to connect to my db the production build broke. This was because that db client used native node apis under the hood.
I was not yet aware of the limitations or reasons for the edge runtime, so it was very non-obvious when just getting errors such as 'Module not found' (for native node libs) or then later 'failed to collect page data'.
Proposal
If it is possible/not too difficult, I believe it would be very valuable to detect if a particular usage of edge runtime is attempting to use native node libraries or other unsupported apis and throw a more specific error calling out that the current usage is not supported in the edge runtime.
Beta Was this translation helpful? Give feedback.
All reactions