Error AtlasError Documentation and Resolution

Node.js type stripping cannot transform TypeScript syntax

SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]

Native TypeScript type stripping removes erasable annotations but does not perform every transformation a TypeScript compiler can. Syntax that needs generated JavaScript can fail even when a separate type check succeeds.

ERR_UNSUPPORTED_TYPESCRIPT_SYNTAXmodules
SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]
  • Source uses enums, parameter properties, import aliases, or namespaces with runtime values.
  • The launch command bypasses the compiler or TypeScript runner used during development.
  • The application assumes Node applies tsconfig.json transformations.
  1. Locate the syntax identified in the error and confirm whether the command executes TypeScript directly rather than emitted JavaScript.
  2. For transformation-dependent features, use a compatible compiler or the project's TypeScript runner, then run and test the resulting program.
  3. If direct native execution is intentional, refactor to erasable syntax where practical, such as ordinary constructor assignments instead of parameter properties.
  4. Check module paths and runtime settings independently: native execution does not read tsconfig.json to apply paths aliases or target transforms. Verify the same launch command in CI and production.
Node.js Docs: TypeScript features