question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cloudflare worker build error

See original GitHub issue

Environment


  • 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:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
danielroecommented, Nov 9, 2022

I can no longer reproduce with the linked repo. Steps:

  1. clone marvincaspar/nuxt-cloudflare
  2. install latest nuxt
  3. run build
  4. npx wrangler dev .output/server/index.mjs --site .output/public --local

If you are still experiencing this, please let me know with a reproduction and I will happily reopen.

1reaction
marvincasparcommented, Sep 13, 2022

Hi @danielroe, I could reproduce the issue from @mehotkhan. There is an other issue if you use cloudflare_pages as 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging Workers - Cloudflare Docs
In this article, you will learn how to effectively debug your Workers application, as well as review some code samples to help you...
Read more >
Build fails immediately with "Failed to start the deployment due ...
Hello! I have been trying to deploy a new version of my website on Cloudflare Pages but it immediately errored out. Here's what...
Read more >
Deprecations · Cloudflare Workers docs
The following commands are deprecated in Wrangler as of Wrangler 2. ​​ build. The wrangler build command is no longer available for building...
Read more >
Get started guide · Cloudflare Workers docs
After you have logged in, you will be asked if Wrangler can make changes to your Cloudflare account. Scroll down and select Allow...
Read more >
Environments · Cloudflare Workers docs
The Workers platform allows you to create and manage different ... the --env or -e flag on wrangler build , wrangler dev ,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found