-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
[Webpack5] API Route still return Internal Server Error when deployed to vercel, but works fine locally #26200
Comments
This adds tracing entrypoints directly after they have have been transpiled to allow us to trace before the webpack runtime has been added to the modules. This should allow for more accurate tracing of entrypoints and allow the trace step to be cached. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added x-ref: vercel#24700 x-ref: vercel#26200 x-ref: vercel#23894 x-ref: vercel#25431
Hi, this has been updated and can now be tested in module.exports = {
experimental: {
nftTracing: true
}
} |
Nice! @ijjk 🙏 It worked now. Will update to next11.1.1 stable when its out. https://github.com/sozonome/sznm.dev/blob/next-11.1.1/nftTracing/next.config.js |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
11.0.0
What version of Node.js are you using?
14.15.3
What browser are you using?
Chrome
What operating system are you using?
Windows
How are you deploying your application?
Vercel
Describe the Bug
I have a project which have an API route which returns collection of data from markdowns using gray-matter. Works fine locally and when deployed to vercel. But after updating to Next 11 which has Webpack 5 enabled by default, the api route return ISE (Internal Server Error) when deployed to vercel. Previously I reported the same problem with a sample project here: #23894.
But I found out it still happen in my other project:
https://github.com/sozonome/sznm.dev/tree/update-next/11
https://sznm-dev-m9igy0ifj-sozonome.vercel.app/api/projects
If I disabled the webpack5, everything works fine
https://github.com/sozonome/sznm.dev/tree/update-next/11-wp5-disabled
https://sznm-dev-qqvhfi2jd-sozonome.vercel.app/api/projects
Expected Behavior
The api route should works fine locally and when being deployed.
should return like this:
(webpack5 disabled - next version 10.2) https://sznm.dev/api/projects
(webpack5 disabled - next version 11) https://sznm-dev-qqvhfi2jd-sozonome.vercel.app/api/projects
To Reproduce
The project repository which I tried to update to next 11 (not in the main branch):
https://github.com/sozonome/sznm.dev/tree/update-next/11
Deployed (Vercel) which return ISE (Internal Server Error):
https://sznm-dev-m9igy0ifj-sozonome.vercel.app/api/projects
The text was updated successfully, but these errors were encountered: