You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@workflowbuilder/ui: types fail under moduleResolution node16/nodenext due to extensionless relative imports in .d.ts files #275
@workflowbuilder/ui declares "type": "module", so TypeScript treats its .d.ts files as ES modules, but the published declarations use extensionless relative specifiers (for example export * from './components/accordion' in dist/index.d.ts and export * from './date-picker' in dist/components/date-picker/index.d.ts), causing all root and subpath exports to fail to resolve under moduleResolution: "node16" or "nodenext".
Reproduction (tsconfig.json and repro.mts in an empty directory):
repro.mts(1,10): error TS2305: Module '"@workflowbuilder/ui"' has no exported member 'Accordion'.
repro.mts(1,21): error TS2305: Module '"@workflowbuilder/ui"' has no exported member 'Avatar'.
repro.mts(2,10): error TS2305: Module '"@workflowbuilder/ui/date-picker"' has no exported member 'DatePicker'.
With "skipLibCheck": false, tsc also reports 30 TS2834 errors inside node_modules/@workflowbuilder/ui/dist/**/*.d.ts:
node_modules/@workflowbuilder/ui/dist/index.d.ts(1,15): error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.
Expected output: no errors (as with npx tsc -p . --module esnext --moduleResolution bundler).
Likely cause: packages/ui/vite.config.mts emits declarations with vite-plugin-dts without bundling types or adding .js extensions to relative and rewritten @ui/* specifiers (unlike packages/sdk/vite.config.mts, which sets rollupTypes: true, and publint in packages/ui only checks package.json entry paths rather than imports inside .d.ts files).
Versions tested: @workflowbuilder/[email protected] (latest on npm) and main at 05221c2 (pnpm --filter @workflowbuilder/ui build), with TypeScript 5.9.3 and 7.0.2 on Node v26.13.0.
Thanks for the precise report. Reproduced on @workflowbuilder/[email protected]: under node16 and nodenext every root and subpath export fails to resolve, for the reason you describe. bundler resolution works, which is why our own apps never hit it.
We will look into it and let you know here once it is resolved.
For now, the workaround is moduleResolution: "bundler".
Activity
piotrblaszczyk commentedon Nov 23, 2026
Thanks for the precise report. Reproduced on
@workflowbuilder/[email protected]: undernode16andnodenextevery root and subpath export fails to resolve, for the reason you describe.bundlerresolution works, which is why our own apps never hit it.We will look into it and let you know here once it is resolved.
For now, the workaround is
moduleResolution: "bundler".