-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
dependenciesPackage dependencies and dependency updatesPackage dependencies and dependency updates
Description
Problem
Attempting to upgrade from [email protected] to [email protected] causes runtime errors in browser builds due to Node.js-specific module dependencies.
Error
TypeError: Failed to resolve module specifier "inngest".
Relative references must start with either "/", "./", or "../".
Root Cause
Inngest 3.44+ uses Node.js-specific APIs (createRequire from node:module) that cannot be bundled for browser environments. Even with Vite alias configuration redirecting to a browser stub, the bundled output still contains bare module specifiers like import 'inngest' which browsers cannot resolve.
Approaches Tried (PR #1156)
- Vite externalization - Marked inngest as external in rollupOptions
- Client-safe wrapper - Refactored browser code to use API endpoints
- Vite alias to browser stub - Redirected
inngestimports to browser stub during build - Export matching - Added
InngestandNonRetriableErrorexports to stub
Result: Build succeeds, but runtime fails with module specifier error.
Investigation Needed
The bundler is still producing output with bare 'inngest' imports despite the alias. This suggests:
- Dynamic imports may be bypassing the alias
- Some code path is importing inngest at runtime rather than build time
- The alias isn't being applied to all module resolution contexts
Requirements for Success
- Node.js 20+ (upgraded from 14+)
- TypeScript 5.8+ (upgraded from 4.7+)
- Zod 4.x (upgraded from 3.22.x)
Recommended Next Steps
- Investigate which code path produces the bare
'inngest'import in bundled output - Consider conditional exports or import maps as alternative approaches
- Contact Inngest team about browser compatibility strategy for v3.44+
- Evaluate if delaying upgrade until better solution exists
Related
- PR [Snyk] Upgrade inngest from 3.41.0 to 3.44.1 #1156 - Failed upgrade attempt with detailed commit history
- Inngest 3.44.0 Release Notes
Metadata
Metadata
Assignees
Labels
dependenciesPackage dependencies and dependency updatesPackage dependencies and dependency updates