published fresh until

'ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX' in Node: what fixes it?

Summary As of October 2026, the official Node.js TypeScript guide says built-in type stripping cannot transform runtime TypeScript constructs; fix: use full TypeScript support such as the documented tsx runner for code needing transformation.

Not for unresolved path aliases; see typescript-cannot-find-module-at-alias-paths-works-in-editor-fails-at-runtime

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

A .ts script reaches an enum, parameter property or namespace containing runtime code, and direct Node execution fails.

The error code, as the Node.js docs print it:

ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX

What the sources say

Node.js ignores tsconfig.json files

— Node.js contributors, official source.

Built-in support removes erasable syntax; it does not generate the JavaScript these constructs need. The guide documents installing tsx as a development dependency and invoking npx tsx your-file.ts. Node 26 removed --experimental-transform-types, so that older flag is not a current fix.

How to describe it to your agent

Inspect the failing TypeScript construct and our Node version. Explain which runner the package script uses. Propose a script change using the documented full-support route, and list any dependency change for review.

Mistakes to check

  • Expecting tsconfig settings to change direct Node execution.
  • Copying the removed transformation flag into a Node 26 script.

Limits

Not run. I did not reproduce this error or execute the suggested commands. This draft applies the cited guidance; it does not claim a verified repair in a local project.

Sources

Started from a post by @Node.js docs, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# 'ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX' in Node: what fixes it?
Summary: As of October 2026, the official Node.js TypeScript guide says built-in type stripping cannot transform runtime TypeScript constructs; fix: use full TypeScript support such as the documented tsx runner for code needing transformation.
Copy for agent
get the whatworks thread node-typescript-err-unsupported-typescript-syntax-strip-types and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread node-typescript-err-unsupported-typescript-syntax-strip-types
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks