Cloudflare worker build error
See original GitHub issueEnvironment
- Operating System:
Linux - Node Version:
v16.17.0 - Nuxt Version:
3.0.0-rc.10-27711996.0ab29f6 - Nitro Version:
0.5.2-27709289.11cc5cd - Package Manager:
yarn@1.22.19 - Builder:
vite - User Config:
ssr,app,css,plugins,build,modules,experimental,components,vite,intlify,vueuse,windicss,content - Runtime Modules:
unplugin-icons/nuxt,@intlify/nuxt3@0.2.4,@nuxt/content@2.1.0,@vueuse/nuxt@9.2.0,@nuxtjs/eslint-module@3.1.0,nuxt-windicss@2.5.2,@nuxtjs/svg@0.4.0 - Build Modules:
-
Reproduction
Describe the bug
` WARN To preserve the export signature of the entry module “node_modules/nitropack/dist/runtime/entries/cloudflare.mjs”, an empty facade chunk was created. This often happens when creating a bundle for a web app where chunks are placed in script tags and exports are ignored. In this case it is recommended to set “preserveEntrySignatures: false” to avoid this and reduce the number of chunks. Otherwise if this is intentional, set “preserveEntrySignatures: ‘strict’” explicitly to silence this warning.
ERROR addEventListener is not defined 11:14:47
at .output/server/chunks/nitro/cloudflare.mjs:3361:1 at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:533:24) at async prerender (node_modules/nitropack/dist/shared/nitro.eb16e208.mjs:2670:26) at async node_modules/nuxt/dist/index.mjs:1412:7 at async build (node_modules/nuxt/dist/index.mjs:1969:5) at async Object.invoke (node_modules/nuxi/dist/chunks/build.mjs:45:5) at async _main (node_modules/nuxi/dist/cli.mjs:50:20)`
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)

Top Related StackOverflow Question
I can no longer reproduce with the linked repo. Steps:
buildnpx wrangler dev .output/server/index.mjs --site .output/public --localIf you are still experiencing this, please let me know with a reproduction and I will happily reopen.
Hi @danielroe, I could reproduce the issue from @mehotkhan. There is an other issue if you use
cloudflare_pagesas nitro preset. Is this the right place for this issue or should it be moved to https://github.com/unjs/nitro?Here’s the repo https://github.com/marvincaspar/nuxt-cloudflare