Samuelreichoer
Prerendering not working
Hi, I use nuxt with ddev and craft cms. So basically I run ddev npm run dev for starting the dev server -> Nuxt runs in docker on that url http://0.0.0.0:3000 and gets proxied by the nginx server. Therefor I am able to see the frontend on https://craft-nuxt-starter.ddev.site. When using the dev mode or build script I see no error and data fetching from the https://craft-nuxt-starter.ddev.site/v1/api/xxxx works perfectly.
My nuxt config looks like that:
But when I try to generate the site it throws following errors for every page:
The fetch from the prerender hook works but the api calls in the pages to get the data not.
103 replies
Fetch Data server and client side module recommended way
I am building a querybuilder for Craft CMS and I need to somehow make fetches on client and server side. I tried to do that with useFetch like that
But that only works on client side?! I am confused. What is the recommended way to do that? Maybe like that? https://nuxt.com/docs/guide/recipes/custom-usefetch#custom-usefetch
10 replies