miurla / morphic

An AI-powered search engine with a generative UI
https://morphic.sh
Apache License 2.0
5.06k stars 1.18k forks source link

Fix Cloudflare Pages build error. #113

Closed kalashnikov closed 2 months ago

kalashnikov commented 2 months ago

Hi,

I am trying to deploy it on Cloudflare Pages and I got build error since yesterday. I got below error message

The following routes were not configured to run with the Edge Runtime:
    - /_not-found

And I found below page might be related and it does fix the error. https://nextjs.org/docs/app/api-reference/file-conventions/not-found

I am not next.js expert - just tried to deploy it on Cloudflare Pages for use. Not sure it is correct way to solve it.

vercel[bot] commented 2 months ago

@kalashnikov is attempting to deploy a commit to the morphic Team on Vercel.

A member of the Team first needs to authorize it.

miurla commented 2 months ago

@kalashnikov Thank you for the PR. Since the error is resolved, it seems like a good workaround. However, not-found.tsx is supposed to be prepared only when a custom page is needed, so it shouldn't normally be necessary. No error occurs with Vercel. Further investigation is needed to determine if this change is necessary. Similar reports have also been made. https://github.com/cloudflare/next-on-pages/issues/413#issuecomment-1976355283

Therefore, I have created an issue and referred to this PR. #114 Please do not merge this PR, but close it.

kalashnikov commented 2 months ago

Got it. Thanks for the feedback. I will close it.