Skip to content

Potential workflow/builders@4.0.1-beta.64 regression: Next.js build fails to resolve relative .ts imports in step files #1555

@pablodecm

Description

@pablodecm

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions