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] 无法在cloudflare pages部署 #4730

Closed
1 of 4 tasks
zhz8951 opened this issue May 18, 2024 · 5 comments
Closed
1 of 4 tasks

[Bug] 无法在cloudflare pages部署 #4730

zhz8951 opened this issue May 18, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@zhz8951
Copy link
Contributor

zhz8951 commented May 18, 2024

Bug Description

按照/docs/cloudflare-pages-cn.md在cloudflare pages部署时出现以下问题:

22:14:00.266 | ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
22:14:00.266 | ⚡️
22:14:00.266 | ⚡️ The following routes were not configured to run with the Edge Runtime:
22:14:00.266 | ⚡️ - /_not-found
22:14:00.267 | ⚡️
22:14:00.267 | ⚡️ Please make sure that all your non-static routes export the following edge runtime route segment config:
22:14:00.267 | ⚡️ export const runtime = 'edge';
22:14:00.267 | ⚡️
22:14:00.267 | ⚡️ You can read more about the Edge Runtime on the Next.js documentation:
22:14:00.267 | ⚡️ https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes
22:14:00.267 |  
22:14:00.306 | Failed: Error while executing user command. Exited with error code: 1
22:14:00.319 | Failed: build command exited with code: 1
22:14:01.294 | Failed: error occurred while running build command

Steps to Reproduce

按照/docs/cloudflare-pages-cn.md操作

Expected Behavior

正常工作

Screenshots

No response

Deployment Method

  • Docker
  • Vercel
  • Server
  • Cloudflare

Desktop OS

Windows 10

Desktop Browser

Chrome

Desktop Browser Version

124.0

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@zhz8951 zhz8951 added the bug Something isn't working label May 18, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] Unable to deploy on cloudflare pages

@zhz8951
Copy link
Contributor Author

zhz8951 commented May 18, 2024

补充:我没有找到 #3411 提到的方法中的要修改的文件,因为它们都已被修改

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Added: I didn't find the files to modify in the method mentioned in #3411 because they were all modified

@zhz8951
Copy link
Contributor Author

zhz8951 commented May 19, 2024

已解决
将构建命令改为npx @cloudflare/next-on-pages --experimental-minify即可

@zhz8951 zhz8951 closed this as completed May 19, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


solved
Change the build command to npx @cloudflare/next-on-pages --experimental-minify

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

No branches or pull requests

2 participants