vercel / nextjs-subscription-payments

Clone, deploy, and fully customize a SaaS subscription application with Next.js.
https://subscription-payments.vercel.app/
MIT License
6.23k stars 1.27k forks source link

Could not find a relationship between 'products' and 'prices' in the schema cache #140

Closed PatelN123 closed 1 year ago

PatelN123 commented 1 year ago

Hi,

I get the above error, with:

info  - Linting and checking validity of types...
07:28:32.396 | info  - Creating an optimized production build...
07:28:44.919 | info  - Compiled successfully
07:28:44.920 | info  - Collecting page data...
07:28:48.198 | info  - Generating static pages (0/5)
07:28:48.261 | info  - Generating static pages (1/5)
07:28:48.270 | info  - Generating static pages (2/5)
07:28:48.274 | info  - Generating static pages (3/5)
07:28:48.672 | Could not find a relationship between 'products' and 'prices' in the schema cache
07:28:48.673 | info  - Generating static pages (5/5)
07:28:48.673 |  
07:28:48.674 | Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
07:28:48.674 | [object Object]
07:28:48.674 |  
07:28:48.675 | > Build error occurred
07:28:48.677 | Error: Export encountered errors on following paths:
07:28:48.678 | /
07:28:48.678 | at /vercel/path0/node_modules/next/dist/export/index.js:394:19
07:28:48.679 | at runMicrotasks (<anonymous>)
07:28:48.679 | at processTicksAndRejections (node:internal/process/task_queues:96:5)
07:28:48.679 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
07:28:48.680 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
07:28:48.680 | at async /vercel/path0/node_modules/next/dist/build/index.js:1044:17
07:28:48.680 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
07:28:48.681 | at async Object.build [as default] (/vercel/path0/node_modules/next/dist/build/index.js:65:29)
07:28:48.718 | error Command failed with exit code 1.
07:28:48.719 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
07:28:48.743 | Error: Command "yarn run build" exited with 1

Please advise how I can resolve this.

nextboringai commented 1 year ago

same error.... i need help please :(, and also, when i wanna add supabase as integration, it shows a pop up, but do nothing.

nabilfatih commented 1 year ago

i had same error as well... i was cloning this repo like 1 month ago, and it still works fine. but i cloning this repo again, and it doesnt work... and also, when i wanna add supabase as integration, it gives me a pop up into supabase, but do nothing. i have cleared my cache but it gives me nothing.

Maye there is changes in vercel or supabase? and that changes occur bug(?)

Anyone know how to solve this? really need help :(

thorwebdev commented 1 year ago

Sorry to hear that you're running into this! Investigating now.

BirbEXE commented 1 year ago

same here :3

thorwebdev commented 1 year ago

There was an issue with our vercel integration, sorry about that. This has been fixed now, please retry.

BirbEXE commented 1 year ago

There was an issue with our vercel integration, sorry about that. This has been fixed now, please retry.

it seems the commit that fixed this no longer exists??? I can see in my logs that you created and deleted it

did it not work?

thorwebdev commented 1 year ago

Our vercel integration is in a different repository. Not sure what commit you're referring to.

karuzo17 commented 1 year ago

@thorwebdev for me, it still doesn't work. I cloned the repo again, but still the same error message.

BirbEXE commented 1 year ago

Same here

On Thu, 24 Nov 2022, 14:18 tmhrl, @.***> wrote:

@thorwebdev https://github.com/thorwebdev for me, it still doesn't work. I cloned the repo again, but still the same error message.

— Reply to this email directly, view it on GitHub https://github.com/vercel/nextjs-subscription-payments/issues/140#issuecomment-1326514325, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLRTLYKTC3ZTXWAZTNPNXTWJ52MBANCNFSM6AAAAAAR4H3HSI . You are receiving this because you commented.Message ID: @.***>

thorwebdev commented 1 year ago

Have you made sure to set up the schema in Supabase?

Did you use the Deploy button in the readme https://github.com/vercel/nextjs-subscription-payments#deploy-with-vercel and went through the supabase deploy integration in there? That sets up the schema for you. (that part was broken and is now fixed)

If you're not using the deploy button you will need to set up the schema yourself, e.g. via the Stripe Subscriptions quickstart in the SQL editor: https://app.supabase.com/project/_/sql

image
bharathvaj-ganesan commented 1 year ago

Thanks thorwebdev Is this mentioned in the readme doc ?

olingern commented 1 year ago

Did you use the Deploy button in the readme https://github.com/vercel/nextjs-subscription-payments#deploy-with-vercel and went through the supabase deploy integration in there? That sets up the schema for you. (that part was broken and is now fixed)

This appears to still have issues

JSON error from Vercel push-to-repo endpoint

{"error":{"code":"bad_request","message":"Invalid request: missing required property `source`."}}
image