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

Problem with fetch data in production #400

Open
milanblasko28 opened this issue Mar 15, 2024 · 1 comment
Open

Problem with fetch data in production #400

milanblasko28 opened this issue Mar 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@milanblasko28
Copy link

milanblasko28 commented Mar 15, 2024

node:"20.5-alpine"
"nuxt": "^3.10.3"
@nuxtjs/strapi": "^1.11.0",

Hi, I have problem with fetch data in production mode. I fetch like this:
const { data: products, refresh: refreshProducts } = await useAsyncData("sanitary-cabins", () => find<any>("sanitary-cabins", { populate: "*" }) );

In development mode everything is okay. If I go to site data are fetch, but If I refresh page I get 500 error and in network is not any API call. When I fetch API using useFetch everything works fine.

@milanblasko28 milanblasko28 added the bug Something isn't working label Mar 15, 2024
@chenjackle45
Copy link

Hi @milanblasko28 ,

I encountered the same issue with fetching data in production mode using useAsyncData. In development mode, everything works fine, but I get a 500 error when refreshing the page in production mode, and there are no API calls in the network tab.

Have you managed to resolve this issue? If so, could you please share your solution?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants