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

fix cloudflare deployment instructions #2781

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

rickyrobinett
Copy link
Contributor

This update resolves an error when trying to deploy an error on cloudflare.

@Yidadaa Yidadaa merged commit 70a2d11 into ChatGPTNextWeb:main Sep 7, 2023
1 check failed
@rickyrobinett
Copy link
Contributor Author

Thanks for accepting my PR @Yidadaa. Love the project. Ok if i remove deprecated from the Cloudflare docs section in the README? Now that this is working I'm willing to continue to ensure this doesn't break again

@ShinChven
Copy link

Still getting error:



15:03:44.704 | ▲  Warning: Could not identify Next.js version, ensure it is defined as a project dependency.
-- | --
15:03:44.788 | ▲  Error: No Next.js version could be detected in your project. Make sure `"next"` is installed in "dependencies" or "devDependencies"
15:03:44.895 |  
15:03:44.895 | ⚡️ The Vercel build (`npx vercel build`) command failed. For more details see the Vercel logs above.
15:03:44.896 | ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.
15:03:44.896 |  
15:03:44.923 | Failed: Error while executing user command. Exited with error code: 1
15:03:44.933 | Failed: build command exited with code: 1
15:03:45.894 | Failed: error occurred while running build command


alchemist139 pushed a commit to alchemist139/ChatGPT-Next-Web that referenced this pull request Sep 21, 2023
@daiaji
Copy link

daiaji commented Sep 25, 2023

01:05:41.749 | ⚡️ Completed `yarn vercel build`.
-- | --
01:05:42.748 |  
01:05:42.748 | ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
01:05:42.749 | ⚡️
01:05:42.749 | ⚡️ 	The following routes were not configured to run with the Edge Runtime:
01:05:42.749 | ⚡️ 	  - /api/cors/[...path]
01:05:42.749 | ⚡️
01:05:42.749 | ⚡️ 	Please make sure that all your non-static routes export the following edge runtime route segment config:
01:05:42.749 | ⚡️ 	  export const runtime = 'edge';
01:05:42.749 | ⚡️
01:05:42.750 | ⚡️ 	You can read more about the Edge Runtime on the Next.js documentation:
01:05:42.750 | ⚡️ 	  https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes
01:05:42.750 |  
01:05:42.789 | Failed: build command exited with code: 1
01:05:43.706 | Failed: error occurred while running build command

Deployment still failed.

@reonokiy
Copy link

reonokiy commented Sep 28, 2023

My deployments failed since commit ebcb2e7 (9 days ago). Same error with daiaji.

@0xD8FF
Copy link

0xD8FF commented Oct 2, 2023

try changing the last line of app/api/cors/[...path]/route.ts to export const runtime = 'edge';

like this:
https://github.com/0xD8FF/ChatGPT-Next-Web/commit/0d62b73093c8209e9f40b2faa9f189e6bb062688

@daiaji
Copy link

daiaji commented Oct 4, 2023

try changing the last line of app/api/cors/[...path]/route.ts to export const runtime = 'edge';

like this: 0xD8FF@0d62b73

It would be nice to fix the mainline code.

Can the scope of this variable setting be set to only work in Cloudflare Pages?

Cnly added a commit to Cnly/ChatGPT-Next-Web that referenced this pull request Dec 2, 2023
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants