-
Notifications
You must be signed in to change notification settings - Fork 45
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] Upgrading from v3.26.3 to 3.28.0 results in Next.js build error #791
Comments
Hi @paradoxloop! Where is Reading through vercel/next.js#28774, it seems this is usually expected if we're performing this import within client-side code. |
@jpwilliams we have utility code that gets used both in backend and frontend. In a couple of places we are throwing the NonRetriableError error which is how we are ending up with Inngest code in the front end. |
@paradoxloop Makes sense. We do intentionally delay the importing of So only |
@jpwilliams yes just NonRetriableError since all other Inngest specific code is sitting in the isolated workflow files that run each workflow. |
@paradoxloop I can't seem to reproduce this just with importing the All the same, there's a small PR at #793 that may resolve the Webpack issue. Could you try that for me? You can install is using:
|
@jpwilliams Thanks for shipping an attempted fix. I just tried it and it does not resolve the issue. I will try to pu together a MVR in the next couple of days. |
I'm experiencing the same issue with Downgrading to Here is the components that triggers the error (redacted for clarity): 'use client'
import * as React from 'react';
import { inngest } from '@/lib/inngest/client'
export function OrganizationImporter() {
const handleSubmit = async (e: React.FormEvent) => {
try {
await inngest.send({
name: "organizations.bulk-import",
data: {
websiteUrls: validWebsites.map((site) => site.url),
},
});
} catch (error) {
}
};
return <form onSubmit={handleSubmit}></form>;
} my inngest client looks like this: import { Inngest } from 'inngest'
export const inngest = new Inngest({ id: 'xxxx' }) |
I have solved the issue by moving inngest trigger from the client component. It took me a while to realize that inngest can only be used on the server, or at least that's my current understanding. Maybe this could be more explicitly mentioned in the documentation or an error message? |
Describe the bug
Next.js app upgrade from inngest v3.26.3 to 3.28.0 results in an error during build time.
Upgrading to 3.27.5 works so something is breaking in the 3.28.0 release.
If I had to guess this line in the new async feature is causing webpack some grief:
The reason this code might be touching webpack is that we reuse some utility functions across the app that throw Innegst NonRetriable errors. Commenting these out makes the error go away.
Expected behavior
There should be no build error.
Code snippets / Logs / Screenshots
System info (please complete the following information):
The text was updated successfully, but these errors were encountered: