-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with Next.js Edge API runtime using edge-light
condition
#238
Comments
pajecawav
changed the title
Incompability with Next.js Edge API runtime
Iincompatibility with Next.js Edge API runtime
May 7, 2023
pajecawav
changed the title
Iincompatibility with Next.js Edge API runtime
Incompatibility with Next.js Edge API runtime
May 7, 2023
Thanks for reporting this. Let me do some more research how reliable is this new condition. FYI we had been thinking to introduce similar condition for Nitro/Nuxt (unjs/nitro#1123) |
pi0
changed the title
Incompatibility with Next.js Edge API runtime
Incompatibility with Next.js Edge API runtime using May 8, 2023
edge-light
condition
pajecawav
added a commit
to pajecawav/ghloc-web
that referenced
this issue
May 20, 2023
add patch for unjs/ofetch#238
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
ofetch: v1.0.1
next: from v13.1.7-canary.17 to v13.4.1
node: v18.15.0
Reproduction
https://github.com/pajecawav/next-ofetch-edge-api-route
To reproduce:
git clone https://github.com/pajecawav/next-ofetch-edge-api-route cd next-ofetch-edge-api-route pnpm install pnpm build
Describe the bug
Starting from [email protected] I can't use
ofetch
inside an Edge API route because build fails with an error"Module build failed: UnhandledSchemeError: Reading from "node:buffer" is not handled by plugins (Unhandled scheme)."
.After some digging I figured out that most likely changes in this PR caused the issue.
I managed to get it working by removing
"node"
section from"exports"
field in thepackage.json
ofofetch
:Adding
"edge-light"
also seems to fix the issue:Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: