Skip to content

FITB: Dynamic substitutions require node modules be installed.#1018

Merged
oscarlevin merged 3 commits intoPreTeXtBook:mainfrom
dbrianwalton:fitb-node
Jul 9, 2025
Merged

FITB: Dynamic substitutions require node modules be installed.#1018
oscarlevin merged 3 commits intoPreTeXtBook:mainfrom
dbrianwalton:fitb-node

Conversation

@dbrianwalton
Copy link
Copy Markdown
Contributor

I believe that this captures the CLI requirements to match pretext PR #2577. Before the dynamic substitution extraction routine in core can be called, we need to ensure that the associated node packages are installed. (In pretext/script/dynsub). Node can't load the dynamic JS libraries that Runestone components require for versions below 22.10, and which is required to generate the randomized content that is being extracted.

I made three key changes mimicking what was happening with themes (also require npm install), but don't know how to test them:

  1. Update the install script to install script/dynsub node packages
  2. Add a test routine (ensure_dynsub_node_packages) which tries to install if missing
  3. Update the routine that calls core:dynamic_substitutions to call the test routine

I don't know of any other changes that would be required. This is more intended to point out what I understand would be needed, and I hope it is enough for you to understand if anything else is missing.

@oscarlevin oscarlevin merged commit c26fc1a into PreTeXtBook:main Jul 9, 2025
@oscarlevin
Copy link
Copy Markdown
Member

Thanks. I edited one of the error messages and updated the core commit to make sure it had the most recent changes. Worked well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants