Nuxt 3.3.1 build error on Cloudflare Pages

Hello,

After updating a working Nuxt 3.2.3 (Nitro 2.2.3) to Nuxt 3.3.1 (Nitro 2.3.1), Cloudflare Pages build fails with the following message:
10:18:30.834 Validating asset output directory
10:18:30.834 Error: Output directory .output/public not found.
10:18:31.784 Failed: build output directory not found

Environment:
Build command: npm run build
Build output directory: /.output/public
Variable: NODE_VERSION: 17
Nuxt without any additional settings and modules

try Build output directory: /dist

Thank you, after changing the output directory to /dist, the Nuxt 3.3.x can be built successfully.

But I don’t quite understand that /dist should be just an alias of /.output/public in nuxt, and if I set /dist in 3.0, it will often cause build errors on Cloudflare Pages. At the same time, the current Cloudflare Pages official document also recommends using /.output/public on deploy a Nuxt site

2 Likes