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

Medusa Storefront Runs Correctly on Localhost but Encounters Issues After Deployment to Vercel; Backend Hosted on Railway in Server Mode #394

Open
asif7897 opened this issue Nov 8, 2024 · 7 comments

Comments

@asif7897
Copy link

asif7897 commented Nov 8, 2024

1

2

The problem now is that after deploying to Vercel, everything initially appears fine. However, when I navigate to a product page, it shows this URL:

4

3

I've already fixed store CORS, admin CORS, and other related settings. I've also followed the Medusa documentation (version 2.1) for troubleshooting this type of error, but I still can't identify the problem.

@fuxianwei
Copy link

I ran the same problem locally as yarn build && yarn start.

@sgirones
Copy link

hey @asif7897 thanks for reporting. Have you checked if Vercel provides any logs for those RSC requests? You can probably use those X-Vercel-Id headers to identify the requests in their UI.

@fuxianwei could you provide more details about the issue? If you were able to reproduce locally, can you paste the error logs of the failed request?

Thanks!

@fuxianwei
Copy link

The console printed the following error:

⨯ [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] { digest: 'DYNAMIC_SERVER_USAGE' }

截屏2024-11-11 19 28 59

Copy link

@fuxianwei do you have server logs for those RSC requests?

@ouestlabs
Copy link

Issue #396

Add the following configuration to /src/app/[countryCode]/(main)/products/[handle]/page.tsx:

// ... existing imports ...

// Add this line at the top of the file
export const dynamic = "force-dynamic"

// ... rest of the file remains unchanged ...

@fuxianwei
Copy link

Thanks for your reply, your method solves the problem.

@ouestlabs
Copy link

ouestlabs commented Nov 12, 2024

Thanks for your reply, your method solves the problem.

cheers 🥂

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

No branches or pull requests

4 participants