[Pkg-javascript-devel] Bug#1148806: node-katex: libjs-katex's ES module entry imports @babel/runtime, which nothing depends on

Emfox Zhou emfoxzhou at gmail.com
Thu Sep 24 03:09:24 BST 2026


Package: node-katex
Version: 0.16.10+~cs6.1.0-9
Severity: normal

Hi,

The ES module entry that /usr/share/nodejs/katex/package.json exports as
"import" - /usr/share/javascript/katex/katex.mjs - begins with

    import _defineProperty from '@babel/runtime/helpers/defineProperty';

but neither libjs-katex nor katex has node-babel7-runtime (which is what
installs /usr/share/nodejs/@babel/runtime) in its Depends.  So importing
katex as an ES module fails on any system where nothing else happens to
pull that package in:

    $ node --input-type=module -e 'import("katex")'
    file:///usr/share/javascript/katex/katex.mjs:1
    import _defineProperty from '@babel/runtime/helpers/defineProperty';
    ^
    Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@babel/runtime'
    imported from /usr/share/javascript/katex/katex.mjs

Installing node-babel7-runtime makes it work (the lookup from
/usr/share/javascript/katex/ finds it through /usr/share/node_modules,
which is a symlink to /usr/share/nodejs).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20260924/2cbcf4ec/attachment.htm>


More information about the Pkg-javascript-devel mailing list