-
Notifications
You must be signed in to change notification settings - Fork 12
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
Deploying to CloudFlare pages gives a 500 #46
Comments
Hey there, Thanks for reporting this issue! The module is indeed using axios but it comes with both a composable (that works on client side / ssr) and the server utility that is supposed to work specifically in the server side (like api endpoint). The error you received is quite strange. I have not updated this package in some time. Maybe that could be the issue to it, but I think that it is the first case in a long time for this module. Do you maybe have some clue on what could be breaking it? Can you maybe reproduce the error locally or with a different preset? |
Sorry for the late response. Locally its all fine, these just appear after I build and deploy to CloudFlare and I'm not really getting any logs there. Honestly no idea what could be breaking it and I'm also lacking any deep knowledge about CloudFlare Worker's internals and how they relate to nuxt server runtime. In the mean time I just switched back to using |
I see, thanks for additional details. I am happy that you have made it work. I will try to find some time in the next few weeks to investigate it |
I have a similar issue: I have my backend deployed and accessible via In I have set my
and passed it into the projectConfig for the backend, but when I use the client, Nuxt fails to load the page When I run a local medusa backend and use the localhost:9000 as the baseUrl everything works. Still on "@medusajs/medusa": "^1.20.9" by the way. I should mention that I want to move away from useFetch and rely on the client so any help is appreciated! |
Issue resolved and it was entirely a user error with nginx config not setting CORS headers :) |
Hey @IosebAlavidze Thanks for the news. I am gld that it worked! Just for anyone here. We will be releasing a new version soon (1.0.0) with the support for Medusa 2.0. I hope that it will solve some of the issues you have :) |
Version
nuxt-medusa: 0.5.0
nuxt: 3.12.2
Reproduction Link
Steps to reproduce
What is Expected?
What is actually happening?
I have an app that is already deployed to CloudFlare Pages and is using
useFetch
to interact with a Medusa backend.app is built using
npx nuxi build --preset=cloudflare_pages
and the resultingdist
folder is deployed using wrangler to CloudFlare.I decided to switch the implementation with this module for a better type support however as soon as this module is activated by calling
useMedusaClient
on any page, I get a500 (t.adapter || Rr.adapter) is not a function
error back. CloudFlare Pages' function shows no logs so I can't really really see what is wrong.is this module SSR compatible or is it using Axios underneath?
The text was updated successfully, but these errors were encountered: