unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.89k stars 496 forks source link

"cloudflare:email", and "cloudflare:queue" hook isn't have. #2587

Closed dalbodeule closed 2 months ago

dalbodeule commented 2 months ago

Environment

Node v22.2.0

Reproduction

image

Describe the bug

Inner defineNitroPlugin, nitro.hook.hooks (NitroRuntimeHooks) don't have "cloudflare:email", "cloudflare:queue" hook keys.

After this chore, is issue created.

Additional context

This issue re-issued on this issue

Logs

No response

dalbodeule commented 2 months ago
image

Just in case, I went through the nitro install process and performed the same task in the nitro-app directory. However, even if I try to import cloudflare-module, the result is the same.

zou-yu commented 2 months ago

It works fine for me, check if you are using nightly build nuxt or nitro likes: "nuxt": "npm:nuxt-nightly@latest". image

dalbodeule commented 2 months ago

image

I didn't even think about nightly builds. After using the Nigitly build, I was able to use the "cloudflare:email" and "cloudflare:queue" hooks. thank you for telling me.

dalbodeule commented 2 months ago

What was originally supposed to be MessageBatch, I looked it up today and found that it was written as CloudflareEmailContext.