Skip to content

"TypeError: Cannot read properties of undefined (reading 'apiConnect')" #287

@rithik20

Description

@rithik20
import Mailjet from 'node-mailjet';
import { SendOtpUtils } from './abstract_service/send_otp_utils';

export class SendEmailOtpUtils implements SendOtpUtils {
  async sendOtp(email: string, otp: number) {
    const mailjetClient = Mailjet.apiConnect(
      process.env.EMAIL_API_KEY,
      process.env.EMAIL_SECRET_KEY,
    );
   .
   .
   .
  }
}

I'm facing an exception "TypeError: Cannot read properties of undefined (reading 'apiConnect')"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions