mailjet / mailjet-apiv3-nodejs

[API v3] Official Mailjet API v3 NodeJS wrapper
https://dev.mailjet.com
MIT License
236 stars 69 forks source link

TypeScript Error: Property 'connect' does not exist on type 'typeof Mailjet' in node-mailjet v6.x #284

Open MamunsCrafts opened 1 month ago

MamunsCrafts commented 1 month ago

import { Injectable, InternalServerErrorException } from '@nestjs/common'; import Mailjet from 'node-mailjet'; import ejs from 'ejs'; import { welcomeMailTemplate } from '../templates/welcome';

@Injectable() export class EmailService { private readonly mailjet: any;

constructor() { this.mailjet = Mailjet.connect( // here connect not working . i also try apiConnect process.env.MJ_APIKEY_PUBLIC || 'your-api-key', process.env.MJ_APIKEY_PRIVATE || 'your-api-secret' ); }

// Other methods... } I am trying this . but this error is showing always

lassesbrt commented 1 week ago

Same issue here.