Edge runtime giving 500 error on vercel with route groups
See original GitHub issueVerify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.2.0: Sun Oct 16 18:11:16 PDT 2022; root:xnu-8792.60.32.0.1~11/RELEASE_ARM64_T8103 Binaries: Node: 16.17.1 npm: 8.15.0 Yarn: 1.22.18 pnpm: 7.1.0 Relevant packages: next: 13.0.2-canary.0 eslint-config-next: N/A react: N/A react-dom: N/A
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
When deploying with vercel, every page within a group gives a 500 error, in my app i’m using group to provide an error boundary in root pages.
I also tried to see this on the app-dir
example provided by nextjs, and it seems to bug on the route groups.
The logs in vercel show this :
2022-11-02T21:52:33.790Z 4e64120d-d3e0-4fa3-9cb5-a32e7802f79b ERROR ReferenceError: self is not defined
at Object.<anonymous> (/var/task/webapp/.next/server/app/(root)/page.js:1:1)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.requirePage (/var/task/node_modules/.pnpm/next@13.0.1-canary.1_yh4i277f6ufllgtdszlodalmum/node_modules/next/dist/server/require.js:88:12)
at /var/task/node_modules/.pnpm/next@13.0.1-canary.1_yh4i277f6ufllgtdszlodalmum/node_modules/next/dist/server/load-components.js:37:73
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
page: '/'
}
RequestId: 4e64120d-d3e0-4fa3-9cb5-a32e7802f79b Error: Runtime exited with error: exit status 1
Runtime.ExitError
Expected Behavior
It should not throw an error… (i think ?)
Link to reproduction
https://github.com/Fredkiss3/nextjs-13-react-router-contacts
To Reproduce
Go to the the website, you can deploy to your vercel account or go to the website url (you will only the 500 error though). Or go to this example : http://app-directory-next-13.vercel.app/ then go to the route groups you will see the same error.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:13 (1 by maintainers)
Please accept my sincerest apologies for trying to help.
@Winwardo yes the problem is that the issue was about route groups and not i18n and i don’t see what is the relation between those two, and like you i didn’t use i18n.
Right now it isn’t a pain for me since i don’t really use vercel to deploy my nextjs projects, but feel free to open another issue. Maybe that one will be picked by nextjs core team.