#400·strapi

Problem with fetch data in production

Author: milanblasko28Created Mar 15, 2024Updated Apr 13, 2025
Labelsbug
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.