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
This makes it impossible to import correctly - named import type-checks but crashes at runtime, default import works at runtime but fails type-checking.
The fix would be to choose either named or default export and use in both places. Happy to submit a PR for whichever direction you prefer.
Personal preference here would be for named exports -- that makes transition a drop-in replacement and also accounts for needing to use named imports when importing the type for XmlBuilderOptions
import { Builder } from 'fast-xml-builder';
^
SyntaxError: The requested module 'fast-xml-builder' does not provide an export named 'Builder'
at #asyncInstantiate (node:internal/modules/esm/module_job:327:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:431:5)
at async node:internal/modules/esm/loader:633:26
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)
Activity
timtucker-dte commentedon Mar 3, 2026
Personal preference here would be for named exports -- that makes transition a drop-in replacement and also accounts for needing to use named imports when importing the type for XmlBuilderOptions
fredericbahr commentedon Mar 4, 2026
This currently blocks me implementing my desired use-case. If help is needed, im happy to support.
lenovouser commentedon Jun 2, 2026
amitguptagwl commentedon Jun 2, 2026
@lenovouser Try this