Fast discovery misses TypeScript NodeNext `.js` specifiers → silent WorkflowNotRegisteredError
@ijjk is already working on this.
Since Jul 28, 2026.
Assessment
This issue has not been assessed yet.
Description
Summary
A .ts file using TypeScript NodeNext-style specifiers — export * from './x.js' (what TS itself prescribes) — is invisible to workflow fast discovery. The build succeeds, the workflow/step never registers, and the first signal is a runtime WorkflowNotRegisteredError. esbuild resolves the same specifier fine during bundling, so only the discovery pass is affected.
Where
packages/builders/src/fast-discovery.ts:754-757—.jsis inFAST_DISCOVERY_SOURCE_EXTENSION_SET, so the resolver does a barefileExistsonx.jsand returnsnullwithout ever reaching the candidate-extension loop below.packages/builders/src/fast-discovery.ts:889-890— relative specifiers go through that function only; there is no enhanced-resolve fallback for them.packages/builders/src/fast-discovery.ts:24-30— the enhanced-resolve instance used for bare specifiers is constructed withoutextensionAlias, so deep package imports have the same hole.packages/builders/src/fast-discovery.ts:944-946— unresolved edges are dropped with a barereturn, no diagnostic, which is why the failure is silent.packages/builders/src/fast-discovery.test.tsuses.jsspecifiers (151, 207, 269, 765) but always against real.jsfiles on disk, so this case is untested.
Suggested fix
Contained: in resolvePathLikeSpecifier, on a .js/.jsx/.mjs/.cjs miss, retry the .ts/.tsx/.mts/.cts candidates before returning null (i.e. implement the extensionAlias semantics), and consider emitting a diagnostic when a directive-bearing edge fails to resolve instead of dropping it silently.
Impact
This hits any TypeScript library author following NodeNext module resolution — exactly the audience of the publishing-libraries cookbook. Found while building the Mastra integration (@mastra/workflow), where it cost a debugging cycle.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 365
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 164
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vercel/workflow
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·