Building epub

10 views
Skip to first unread message

OHappyDay

unread,
Jul 28, 2026, 10:49:25 AM (3 days ago) Jul 28
to PreTeXt development
Dear all,

I tried to build an epub file (already on version 2.45.0). It failed with these error messages:
Although node is version 22.22.3 it complains about version 18.19.1

I could solve the problem by erasing the .ptx folder completely and rebuilding the ebook. 
This time the build was successful.

Is there something that can be done on installation of new versions to check whether there is a mismatch between installed node version and the version of node that is somehow referenced in the .ptx folder?

Thanks
Klaus



Collected Errors:

npm
Collected Errors:

ERR! code EBADENGINE

Collected Errors:

npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: rimraf@6.1.3

Collected Errors:

npm
Collected Errors:

ERR! notsup Not compatible with your version of node/npm: rimraf@6.1.3

Collected Errors:

npm ERR!
Collected Errors:

notsup Required: {"node":"20 || >=22"}
npm ERR! notsup Actual: {"npm":"9.2.0"}

Collected Errors:



Collected Errors:

npm ERR!
Collected Errors:

A complete log of this run can be found in:
npm ERR! /home/klaus/.npm/_logs/2026-07-28T14_33_39_194Z-debug-0.log

Collected Errors:

node:internal/modules/cjs/loader:1137
throw err;
^

Error: Cannot find module '@mathjax/src/js/util/asyncLoad/node.js'
Require stack:
- /home/klaus/.ptx/2.45.0/core/script/mjsre/mj-sre-page.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
at Module._load (node:internal/modules/cjs/loader:975:27)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/home/klaus/.ptx/2.45.0/core/script/mjsre/mj-sre-page.js:40:1)
at Module._compile (node:internal/modules/cjs/loader:1356:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:1197:32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/klaus/.ptx/2.45.0/core/script/mjsre/mj-sre-page.js' ]
}

Node.js v18.19.1

Collected Errors:

Document is empty, line 1, column 1 (mj-output-svg.html, line 1)
Failed to build without errors. Exiting...

D. Brian Walton

unread,
Jul 28, 2026, 11:14:24 AM (3 days ago) Jul 28
to prete...@googlegroups.com
I had a similar node versioning issue recently where the system had one version of node installed and I had a different version in another environment. nvm was somehow defaulting back to the older version. I think I tried installing the newer version inside the virtual environment and it worked one time, and then the next time I opened the environment, nvm had reverted to the older version. Instead of installing, I had nvm reselect the newer version and that seems to have stuck.

I was just fumbling around, so my memory may have things mixed up here. I don't even know if nvm respects anything about the virtual environment because I don't think it is a python-related entity.

Brian

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/347dc57e-2cc7-47c9-8e74-c733a60d08ban%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages