[Pkg-javascript-devel] Bug#1151683: nodejs: TypeScript not recognized
Jérémy Lal
kapouer at melix.org
Fri Oct 23 09:10:06 BST 2026
Le ven. 23 oct. 2026 à 04:29, Tom Overlund <tomov at dilacero.org> a écrit :
> Package: nodejs
> Version: 24.22.0+dfsg+~cs24.19.2-2
> Severity: normal
> X-Debbugs-Cc: tomov at dilacero.org
>
> Simple test:
>
> ```
> $ cat hello.ts
> let message: string = 'Hello, World!';
> console.log(message);
>
> $ node hello.ts
> /home/virt/projects/hello_ts/hello.ts:1
> let message: string = 'Hello, World!';
> ^
>
> SyntaxError: Unexpected token ':'
> at wrapSafe (node:internal/modules/cjs/loader:1861:18)
> at Module._compile (node:internal/modules/cjs/loader:1903:20)
> at Object..js (node:internal/modules/cjs/loader:2060:10)
> at Module.load (node:internal/modules/cjs/loader:1651:32)
> at Module._load (node:internal/modules/cjs/loader:1443:12)
> at wrapModuleLoad (node:internal/modules/cjs/loader:261:19)
> at Module.executeUserEntryPoint [as runMain]
> (node:internal/modules/run_main:154:5)
> at node:internal/main/run_main_module:33:47
>
> Node.js v24.22.0
> ```
>
> Same test run from a vanilla build of upstream Node.js:
>
Node.js in Debian is missing node-amaro, which uses swc to parse typescript.
I'll look again if it's possible to package it now, as there have been
efforts to package
the missing pieces (swc).
>
> ```
> $ node hello.ts
> Hello, World!
>
> $ node --version
> v24.22.2-pre
> ```
>
> TypeScript should be natively supported in Node.js in version 24. I believe
> this is also causing problems when trying to build npm packages in
> sid. Typical error:
>
> npm notice run node build/npm/preinstall.ts
> node:internal/modules/esm/get_format:243
> throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath);
>
> (Note I don't have npm currently installed, but I did previously when
> encountering these errors.)
>
> -- System Information:
> Debian Release: forky/sid
> APT prefers unstable
> APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 7.2.11+deb14-amd64 (SMP w/1 CPU thread; PREEMPT)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE
> not set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
>
> Versions of packages nodejs depends on:
> ii libc6 2.43-7
> ii libnode137 24.22.0+dfsg+~cs24.19.2-2
> ii node-corepack 0.35.0-2
>
> Versions of packages nodejs recommends:
> ii ca-certificates 20260816
> ii nodejs-doc 24.22.0+dfsg+~cs24.19.2-2
>
> Versions of packages nodejs suggests:
> pn npm <none>
>
> -- no debconf information
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20261023/9005d58a/attachment.htm>
More information about the Pkg-javascript-devel
mailing list