Skip to content

[BUG] TypeError: Inngest is not a constructor при использовании версии 3.35.0 #955

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

Closed
gHashTag opened this issue Apr 13, 2025 · 2 comments

Comments

@gHashTag
Copy link

gHashTag commented Apr 13, 2025

Description: I encountered a problem using the inngest library. When I try to create a client using new Inngest(...), I get the error:

Code
TypeError: Inngest is not a constructor
Steps to reproduce:

Installed the inngest library version 3.37.0.
Used the following code:
TypeScript

import { createClient } from 'inngest';
import { serve } from 'inngest/express';
import { INNGEST_EVENT_KEY } from '@/config';


console.log('🔄 Initializing Inngest client...');
console.log('🔑 INNGEST_EVENT_KEY available:', !!INNGEST_EVENT_KEY);

if (INNGEST_EVENT_KEY) {
  console.log(
    '🔑 INNGEST_EVENT_KEY first 10 chars:',
    INNGEST_EVENT_KEY.substring(0, 10) + '...'
  );
}


export const inngest = new Inngest({
  id: 'ai-training-server',
  eventKey: process.env.INNGEST_EVENT_KEY,
})

export const serveHandler = serve({
  client: inngest,
  functions: [], // 
});

console.log('✅ Inngest client created:', !!inngest);

export const functions = [];

Actual behavior: Error:

Code
TypeError: Inngest is not a constructor
Additional information:

Library version: 3.35.0
Runtime: Node.js v23.4.0
TypeScript: v5.8.3
If you want, I can help prepare the full text of the Issue or answer any other questions!

@jpwilliams
Copy link
Member

Hi @gHashTag,

It looks like you're not importing Inngest here. You'll need to change your import:

- import { createClient } from 'inngest';
+ import { Inngest } from 'inngest';

@jpwilliams jpwilliams closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants