Nuxt `npx nuxi generate` sometimes builds to `.output/public` and other times to `.dist`?
I'm using the latest nuxt on cloudflare pages but my builds are failing sometimes because of the differing output dir. I don't really understand what is causing the difference in behavior.
I'm following the nuxt docs on deployment so on CF pages I'm running
npx nuxi generate
and looking for the build dir of .output/public
. I've also tried with node 16 and 18 but it doesn't fix the issue.
Some branches are building, while others are not on CF. If I clone the branches with failed builds and run npx nuxi generate
locally it builds to the correct .output/public
dir.
CF pages:
Building same commit locally:
ref: https://nuxt.com/docs/getting-started/deployment#crawl-based-pre-renderingNuxt
Deployment · Get Started with Nuxt
Learn how to deploy your Nuxt application to any hosting provider.
1 Reply
did you try nitro cloudflare_pages preset? https://nuxt.com/deploy/cloudflare