novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.47k stars 3.51k forks source link

🐛 Bug Report: @novu/framework cannot be used in Cloudflare Pages #6346

Open fell-lucas opened 3 weeks ago

fell-lucas commented 3 weeks ago

📜 Description

We get build errors when deploying to CF pages because the package imports unsupported node dependencies.

Even though we are not using the JSON Schema features of @novu/framework, we still get these import errors. Is it possible to ask for conditional importing of the problematic dependencies?

👟 Reproduction steps

  1. Install @novu/framework on a SvelteKit project using @sveltejs/cloudflare-adapter.
  2. Create a workflow using the workflow import from @novu/framework.
  3. Create api/novu/+server.ts and import the serve function from @novu/framework/sveltekit
  4. Run build script / build project

👍 Expected behavior

Not throw build errors because we're not relying on JSON Schema to create our workflows.

👎 Actual Behavior with Screenshots

image

Novu version

Novu SaaS

npm version

NA

node version

NA

📃 Provide any additional context for the Bug.

@novu/framework version: 2.0.0-canary.5

👀 Have you spent some time to check if this bug has been raised before?

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

Yes I am willing to submit a PR!

linear[bot] commented 3 weeks ago

NV-4218 🐛 Bug Report: @novu/framework cannot be used in Cloudflare Pages

rifont commented 3 weeks ago

Thanks for reporting this. The required modules shown in your screenshot are not critical runtime dependencies of Framework and we should be able to make those dependencies conditional.

We plan to investigate conditional importing for these dependencies within the next 2 weeks.