Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Bridge Endpoint does not support Cloudflare workers #7416

Open
2 tasks done
hugo082 opened this issue Jan 2, 2025 · 1 comment
Open
2 tasks done
Labels

Comments

@hugo082
Copy link

hugo082 commented Jan 2, 2025

📜 Description

When deploying the bridge endpoint (via nuxtjs), it ends up with error 500:

TypeError: Cannot read properties of undefined (reading 'indexOf')
  at hasFlag (chunks/_/nuxt.mjs:1:140357)
  ...

👟 Reproduction steps

Deploying the Bridge Endpoint on Cloudflare Workers

👍 Expected behavior

Status code 200

👎 Actual Behavior with Screenshots

Status code 500

Novu version

Novu SAAS

npm version

No response

node version

Cloudflare Workers

📃 Provide any additional context for the Bug.

I deep dived into the issue and it appears to be related to the chalk library - which is used by @novu/framework for logging.

To check if the colors are supported on the environment, it use the supports-color package which ends up with process.argv access.

I opened an issue on the supports-color repo here but I'm not sure novu should use chalk in the production build. Chalk is for terminal (.i.e the package description Terminal string styling done right). IMO it's ok to use it in local/dev but we may skip it in the production / deployed environment.

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

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Copy link

linear bot commented Jan 2, 2025

@github-actions github-actions bot added the triage label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant