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

[🐛 Bug]: i18n edge routes generate nodejs routes with vercel >= 32.2.0 #464

Closed
1 task done
neko-shinshi opened this issue Sep 18, 2023 · 1 comment · Fixed by #466
Closed
1 task done

[🐛 Bug]: i18n edge routes generate nodejs routes with vercel >= 32.2.0 #464

neko-shinshi opened this issue Sep 18, 2023 · 1 comment · Fixed by #466
Labels
bug Something isn't working

Comments

@neko-shinshi
Copy link

next-on-pages environment related information

System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.6.0: Wed Jul 5 22:17:35 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8112
CPU: (8) arm64 Apple M2
Memory: 16 GB
Shell: /bin/zsh
Binaries:
Node: 20.6.1
Bun: N/A
pnpm: 8.6.6
Yarn: 1.22.19
npm: 9.8.1
Package Manager Used: npm
Relevant Packages:
@cloudflare/next-on-pages: 1.6.1
vercel: N/A
next: 13.4.19

Description

Hi, I am using the page router with subpath routing to handle i18 for my existing site and have deployed it with internationalization enabled.

A few hours ago I started getting this error when trying to update, so I made another minimal project to demonstrate it.

`

15:27:23.841 ⚡️ Completed npx vercel build.
15:27:25.037  
15:27:25.038 ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
15:27:25.038 ⚡️
15:27:25.038 ⚡️ The following routes were not configured to run with the Edge Runtime:
15:27:25.039 ⚡️ - /default
15:27:25.039 ⚡️ - /en
15:27:25.039 ⚡️ - /ja
15:27:25.039 ⚡️
15:27:25.039 ⚡️ Please make sure that all your non-static routes export the following edge runtime route segment config:
15:27:25.039 ⚡️ export const runtime = 'edge';
15:27:25.039 ⚡️
15:27:25.039 ⚡️ You can read more about the Edge Runtime on the Next.js documentation:
15:27:25.040 ⚡️ https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes
15:27:25.040  
15:27:25.061 Failed: Error while executing user command. Exited with error code: 1
15:27:25.071 Failed: build command exited with code: 1
15:27:25.966 Failed: error occurred while running build command

`

I already have export const runtime = 'experimental-edge' in each page's code, and it still does not work with 'edge'. The pages work again when internationalization is disabled so the error should be related to it.

Reproduction

I made a minimal project to demonstrate this:
https://github.com/neko-shinshi/cloudflare-next-i18

Pages Deployment Method

Direct Upload (wrangler pages publish or the @cloudflare/pages-action GitHub Action)

Pages Deployment ID

cloudflare-next-i18.pages.dev

Additional Information

No response

Would you like to help?

  • Would you like to help fixing this bug?
@neko-shinshi neko-shinshi added the bug Something isn't working label Sep 18, 2023
@dario-piotrowicz dario-piotrowicz changed the title [🐛 Bug]: [🐛 Bug]: valid i18n edge routes generate nodejs routes with vercel >= 32.2.0 Sep 18, 2023
@dario-piotrowicz dario-piotrowicz changed the title [🐛 Bug]: valid i18n edge routes generate nodejs routes with vercel >= 32.2.0 [🐛 Bug]: i18n edge routes generate nodejs routes with vercel >= 32.2.0 Sep 18, 2023
@dario-piotrowicz
Copy link
Member

Thanks a lot for the issue @neko-shinshi and thanks a lot for being willing to help with it!

This seems like an issue introduced recently by the Vercel CLI, @james-elicx has already opened a PR that should fix it, if you want please check the PR's prerelease to see if it fixes your issue 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants