-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Edge API routes exclude src directory #44077
Comments
Here’s a minimal reproduction: https://github.com/controversial/nextjs-edge-functions-ga-error-repro In the commit history, you can see that the penultimate commit ( Note that this error still exists in the 13.1 release, as well as in the The 13.1 release notes advertise that
but this isn’t true if a project uses a |
Hi, this has been updated in |
Thanks for the bug report @controversial, and apologies for the lag. Let us know if you have other related blockers! |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
Middleware / Edge (API routes, runtime)
Link to the code that reproduces this issue
https://github.com/nickbabcock/rl-web
To Reproduce
Switch config of
src/pages/api/replay
to:And execute
npm run dev
.(apologies, the repo isn't technically a minimal reproduction (as 13.0.7, seems to break in other ways), but the issue / solution should be clear. If not I'll create one a minimal reproduction).
Describe the Bug
Next.js supports putting pages in the
src
directory.So when I tried testing GA version of edge functions (#44045 cc @feugy), I received the following error:
I see that #44045 looks if the route starts with
/pages
so a/src/pages
route throws it off. The solution seems like it should look in thesrc
directory too.A temporary workaround is to move the pages outside of the
src
directory.Expected Behavior
If
src
directory is supported then edge API routes hosted insrc/pages/api
shouldn't error.Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: