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: Class constructor EventEmitter cannot be invoked without 'new' #5840

Open
2 tasks done
kyng-cytro opened this issue Jun 26, 2024 · 1 comment
Open
2 tasks done
Labels

Comments

@kyng-cytro
Copy link

📜 Description

Hi. I recently deployed my nuxt app to Cloudflare and I get this error every time I try to register a new subscriber.
Class constructor EventEmitter cannot be invoked without 'new'

Here's my function code

export const registerSubscriber = async (subscriber: User) => {
  const [firstName, lastName] = subscriber.name.split(" ");
  await novu.subscribers.identify(subscriber.id, {
    firstName,
    lastName,
    email: subscriber.email,
    ...(subscriber.picture && { avatar: subscriber.picture }),
  });
};

Probably has something to do with Cloudflare?

👟 Reproduction steps

  • Create an app with nuxtHub.
  • Add novu/node.
  • Write util function to register subscribers.
  • Call earlier created function in server route.

👍 Expected behavior

No error and the subscriber should be registered successfully

👎 Actual Behavior with Screenshots

Error Class constructor EventEmitter cannot be invoked without 'new'

My App:

image
Nuxt Hub/ Cloudflare logs:

image

Novu version

Novu SaaS

npm version

NA

node version

NA

📃 Provide any additional context for the Bug.

No response

👀 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

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