Then I tried to build MathJax following
Here the warning and errors:pnpm install
WARN 12 deprecated subdependencies found: copy-con...@1.0.5, figgy-puddi
n...@3.5.2, fs-write-st...@1.0.10, fsev...@1.2.13, gl...@7.2.3, inflight@1
.0.6, move-con...@1.0.1, resol...@0.2.1, rim...@2.7.1, source-map-resol
v...@0.5.3, source-...@0.4.1, ur...@0.1.0
pnpm -s build-all
.... Many errors like: .....
Webpack failed with code 2
Webpacking /mjs/input/tex/extensions/textmacros
[webpack-cli] Invalid configuration object. Webpack has been initialised using a
configuration object that does not match the API schema.
- configuration.target should be one of these:
"web" | "webworker" | "node" | "async-node" | "node-webkit" | "electron-main"
| "electron-renderer" | "electron-preload" | function
-> Environment to build for
Details:
* configuration.target should be one of these:
"web" | "webworker" | "node" | "async-node" | "node-webkit" | "electron-ma
in" | "electron-renderer" | "electron-preload"
* configuration.target should be an instance of function
Webpack failed with code 2
mkdir mathjaxcd mathjaxpnpm initpnpm install mathjax@4pnpm install @mathjax/mathjax-newcm-font@4
<script>MathJax = {output: {fontPath: '<path-to-mathjax-newcm-font>',}};</script><script src="<path-to-mathjax>/tex-chtml.js"></script>
About: "If you are hosting your own copy of MathJax, it will still look for the fonts on cdn.jsdelivr.net".If I am hosting my own copy of MathJax, it should be clear that I want to run it locally and I do not want links to outside.It is in my opinion a little flaw in the design with consequences that one perhaps not even note, namely that MathJaxis doing something that one explicitly does not want and taking fonts from outside, or that one notes and causes troubles,for example fossil blocking that internet connections for security reasons.
I normally build programs, keep some in repositories, even if I do not change them. This gives also an impression of thequality of the program, the dependencies and their amount, if it compiles clean or with a lot of warnings, also the troublescompiling says something. Unfortunately I have almost no experience with node or javascript and not even know whatwebpack is.
dependencies:@mathjax/mathjax-newcm-font 4.1.1mhchemparser 4.2.1mj-context-menu 1.0.0speech-rule-engine 5.0.0-beta.6devDependencies:@eslint/js 9.39.2 eslint-plugin-jsdoc 62.5.5 terser-webpack-plugin 5.3.16 webpack-cli 6.0.1@xmldom/xmldom 0.8.11 eslint-plugin-prettier 5.5.5 typedoc 0.28.17 wicked-good-xpath 1.3.0copyfiles 2.4.1 husky 9.1.7 typescript 5.9.3 xslt3 2.7.0diff 8.0.3 lint-staged 16.2.7 typescript-eslint 8.56.0eslint 9.39.2 prettier 3.8.1 typescript-tools 0.3.1eslint-formatter-unix 9.0.1 rimraf 6.1.3 webpack 5.105.2
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/1147acdd-841b-4622-b238-9cee214573d8n%40googlegroups.com.
You don't give much detail about your environment (e.g., the OS you are using, the versions of node and webpack that you are using, etc.),
You might look at the package.json file in the directory where you issued the pnpm install and check the file looks like it is this one:
As for the webpack errors, these seem strange to me, as the complaint seems to be about configuration.target not being one of the accepted values. This could be a version problem. You should check the versions of node and webpack usingpnpm webpack --version
Node's current vision is 25, and you should have webpack 5.105.2 from the MathJax installation. If you dopnpm list
Thanks, here some info:
You might look at the package.json file in the directory where you issued the pnpm install and check the file looks like it is this one:The file is there. What should I see?
As for the webpack errors, these seem strange to me, as the complaint seems to be about configuration.target not being one of the accepted values. This could be a version problem. You should check the versions of node and webpack usingpnpm webpack --version# pnpm webpack --version
webpack: 4.47.0
webpack-cli: 4.10.0
webpack-dev-server not installed
git status
pnpm install web...@5.105.2pnpm install webpa...@6.0.1
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mathjax-users/4c407bdf-f06a-43eb-a10b-6e8bc83d80b8n%40googlegroups.com.
I did:rm -rf whole-repository-with-checkout-and-everything-and-forget-everythinggit clone https://github.com/mathjax/MathJax-src.git MathJax-srccd MathJax-srcgit checkout 4.1.1pnpm installpnpm -s build-all
Then worked, very clean,
but what I got?
And what I do now with it?
In any other piece of software there is a file README and a file INSTALL withenough info for building and making the whole work.
I had mathjax 2 embedded in fossil, I have now mathjax3 doing it with:mkdir MathJax
cd MathJaxnpm install mathjax-fullBut what I do now with mathjax 4?!
Must I clone a repo for fonts and build something?
I see in the checkout with what I just built:node_modules/@mathjax/mathjax-newcm-font/
Are that the fonts? What is what there?
A simple answer could be, I should read the web pages,
but exactly that was the reason that I had the false webpack: there are a lot of different instructions,
I think I did before first something with npm, then I did as root, with a lot ofdistrust and bad feeling: "npm install -g pnpm".
All this is a different ecosystem than the one is used with normal UNIXoids.