Error during deploy example test project started in nuxt

Hello, I have fresh install nuxt project with some example fetch and data. I folow website here. https://nuxt.com/deploy/cloudflare my sqmple config.
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
pages: true,
compatibilityDate: '2024-04-03',
devtools: {enabled: true},
modules: ['@vite-pwa/nuxt', '@pinia/nuxt', '@nuxtjs/tailwindcss', 'pinia-plugin-persistedstate/nuxt'],
tailwindcss: {
exposeConfig: true,
viewer: true,
},
pinia: {
storesDirs: ['./stores/**', './custom-folder/stores/**'],
},
nitro: {
prerender: {
autoSubfolderIndex: false
}
}
});
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
pages: true,
compatibilityDate: '2024-04-03',
devtools: {enabled: true},
modules: ['@vite-pwa/nuxt', '@pinia/nuxt', '@nuxtjs/tailwindcss', 'pinia-plugin-persistedstate/nuxt'],
tailwindcss: {
exposeConfig: true,
viewer: true,
},
pinia: {
storesDirs: ['./stores/**', './custom-folder/stores/**'],
},
nitro: {
prerender: {
autoSubfolderIndex: false
}
}
});
After i run
npx wrangler pages deploy dist
npx wrangler pages deploy dist
i have Uploading... (14/14) and at the end I get error ENOENT: no such file or directory, open '/home/xx/xx/nuxt/1/.wrangler/tmp/pages-Uwhn5L/bundledWorker-0.19668789268986298.mjs' I check directory and the file is not exist there. I try few times to build it again but no success.
Nuxt
Deploy Nuxt to Cloudflare
Deploy your Nuxt Application to Cloudflare infrastructure.
1 Reply
Clown Studios
Clown Studios3mo ago
it looks like the issue is with the wrangler trying to locate the bundled worker file in the wrong directory. the error ENOENT: no such file or directory means it's looking for a file that wasn’t generated or placed where it expects. try clearing the .wrangler directory and rebuilding the project from scratch. you can also check if the dist directory is being built correctly by nuxt. if the problem persists, consider checking your wrangler config or try running npx wrangler pages publish dist instead of deploy to see if it resolves the issue.
Want results from more Discord servers?
Add your server