Skip to content
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

Using Route Groups with Nextjs 13 causing deployment failed #33

Closed
Yoinky3000 opened this issue Nov 27, 2022 · 1 comment · Fixed by #153
Closed

Using Route Groups with Nextjs 13 causing deployment failed #33

Yoinky3000 opened this issue Nov 27, 2022 · 1 comment · Fixed by #153

Comments

@Yoinky3000
Copy link
Contributor

If I use the Route Group inside my nextjs 13 project, the build script will throw an error

In my case, i was trying to create a Route Group called dashboard( xxxx/app/(dashboard)/xxxx ), and when trying to build it, i get this

19:01:03.370 | ⚡️
19:01:03.370 | ⚡️
19:01:03.370 | ⚡️ Completed 'npx vercel build'.
19:01:03.370 | ⚡️
19:01:04.215 | ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
19:01:04.215 | ⚡️ The following functions were not configured to run with the Edge Runtime:
19:01:04.215 | ⚡️
19:01:04.215 | ⚡️  - dashboard.rsc
19:01:04.215 | ⚡️  - dashboard
19:01:04.216 | ⚡️
19:01:04.216 | ⚡️ If this is a Next.js project:
19:01:04.216 | ⚡️
19:01:04.216 | ⚡️  - you can read more about configuring Edge API Routes here (https://nextjs.org/docs/api-routes/edge-api-routes),
19:01:04.216 | ⚡️
19:01:04.216 | ⚡️  - you can try enabling the Edge Runtime for a specific page by exporting the following from your page:
19:01:04.216 | ⚡️
19:01:04.217 | ⚡️      export const config = { runtime: 'experimental-edge' };
19:01:04.217 | ⚡️
19:01:04.217 | ⚡️  - or you can try enabling the Edge Runtime for all pages in your project by adding the following to your 'next.config.js' file:
19:01:04.217 | ⚡️
19:01:04.217 | ⚡️      const nextConfig = { experimental: { runtime: 'experimental-edge'} };
19:01:04.217 | ⚡️
19:01:04.217 | ⚡️ You can read more about the Edge Runtime here: https://nextjs.org/docs/advanced-features/react-18/switchable-runtime
@dario-piotrowicz
Copy link
Member

Note: We've looked into this and think that it will likely get fixed by @james-elicx as part of his routing refactoring: #129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants