Description
After upgrading workflow from 4.2.0-beta.72 to 4.2.0-beta.73, Next.js production builds fail with Module not found errors for relative TypeScript imports inside step files.
The regression is in the transitive dependency @workflow/builders@4.0.1-beta.64, which introduced "Corrected dependency resolution for step imports with TypeScript extensions (.ts, .mts, .cts)". This "correction" breaks resolution of extensionless relative imports to .ts modules — the bundler looks for .js instead of .ts.
Is very strange, but seems that only happens in the vercel build not in local but not totally sure yet about this.
Reproduction
A step file imports a local utility with a standard extensionless relative path:
// upload-video-and-build-output.step.ts
import { getVideoDimensions, getVideoFeatureCost, getVideoOriginAndFetchOptions } from "../utils/model-config";
The file ../utils/model-config.ts exists. The build compiles workflow steps into apps/web/app/.well-known/workflow/v1/step/route.js, which fails:
Module not found: Can't resolve '../../../../../src/server/lib/tasks/video-clip/utils/model-config.js'
Environment
workflow: 4.2.0-beta.73
@workflow/next: 4.0.1-beta.69 (transitive)
@workflow/builders: 4.0.1-beta.64 (transitive — this is the breaking change)
@workflow/rollup: 4.0.0-beta.30 (transitive)
next: 16.2.1
- Node:
24
- macOS
Working versions
Everything builds correctly with workflow@4.2.0-beta.72 and its transitive deps:
@workflow/builders@4.0.1-beta.63
@workflow/next@4.0.1-beta.68
@workflow/rollup@4.0.0-beta.29
Workaround
Pin workflow to 4.2.0-beta.72 or add pnpm overrides for the transitive deps:
# pnpm-workspace.yaml
overrides:
"@workflow/builders": 4.0.1-beta.63
"@workflow/next": 4.0.1-beta.68
"@workflow/rollup": 4.0.0-beta.29
Related
Description
After upgrading
workflowfrom4.2.0-beta.72to4.2.0-beta.73, Next.js production builds fail withModule not founderrors for relative TypeScript imports inside step files.The regression is in the transitive dependency
@workflow/builders@4.0.1-beta.64, which introduced "Corrected dependency resolution for step imports with TypeScript extensions (.ts, .mts, .cts)". This "correction" breaks resolution of extensionless relative imports to.tsmodules — the bundler looks for.jsinstead of.ts.Is very strange, but seems that only happens in the vercel build not in local but not totally sure yet about this.
Reproduction
A step file imports a local utility with a standard extensionless relative path:
The file
../utils/model-config.tsexists. The build compiles workflow steps intoapps/web/app/.well-known/workflow/v1/step/route.js, which fails:Environment
workflow:4.2.0-beta.73@workflow/next:4.0.1-beta.69(transitive)@workflow/builders:4.0.1-beta.64(transitive — this is the breaking change)@workflow/rollup:4.0.0-beta.30(transitive)next:16.2.124Working versions
Everything builds correctly with
workflow@4.2.0-beta.72and its transitive deps:@workflow/builders@4.0.1-beta.63@workflow/next@4.0.1-beta.68@workflow/rollup@4.0.0-beta.29Workaround
Pin
workflowto4.2.0-beta.72or add pnpm overrides for the transitive deps:Related
.tsimports, whichbeta.64attempted to extend