ESM dependency
Since node.js 20.10, ESM module does not work (standard-things/esm/#931), and as the repository was archived on exactly the same day that the issue was filed, it is not likely that ESM will be fixed.
The examples in the repository depend on ESM. Can this dependency be removed? If it can, could the developers update the examples, or at least give the general guidelines how to remove the dependency?
Replacing require with something like import( 'mathjax-full/es5/node-main.js' ).then(…) can help.
Version 4 (currently out in beta release) has both ESM and CommonJS versions. The demos will be updated for the official release.
Not all the demos here use the esm library. For example, the "direct" versions in
https://github.com/mathjax/MathJax-demos-node/tree/master/direct
don'e use esm. The v3 demos use esmwhen you are loading the MathJax components from source, but if you use the--dist` command-line option available on most of the demos, it should not be needed.
In any case, the demos will be updated for v4 what that is officially released.