Fix Mirador build issues on main and 10.x - #6171
Open
tdonohue wants to merge 2 commits into
Open
Conversation
…ese all need to be pinned to versions that are compatible with Mirador v3.
… to use "cross-env" to work with later versions of Node (especially v22.20+)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes issues that have recently appeared on the
mainanddspace-10_xbranch regarding install/build warnings related to Mirador inconsistencies/incompatibilities.There's two main issues that are fixed here:
npm installwill show a number ofERESOLVEwarnings that look like this. These warnings all relate to Mirador and themirador-share-pluginnpm run build:mirador) doesn't work for Node 22.20+. It will throw an immediate error that looks like this:There's two fixes in this PR:
npm installissues, I've pinnedreactandreact-domto16.14.0andnotistackto1.0.10in theoverridessection of thepackage.json.reactandreact-domensures that we are using the exact version of React that Mirador v3 is expectingnotistackis actually a downgrade of thenotistackversion used bymirador-share-plugin. But, this older version ofnotistackis compatible with React v16. (I've also tested it manually and verified this doesn't impact themirador-share-pluginbehavior...the share button still works fine from within Mirador)npm run build:miradorerror, I've updated that script inpackage.jsonto align with thenpm run build:prodscript by usingcross-env. That fixes the build error.NOTE: This needs to be minimally backported to 10.x. It is possible that the
npm installfix may also need to be backported further (I haven't yet analyzed if 9.x sees these same warnings. I suspect it likely does since the warnings come from using Mirador v3 with more modern dependencies elsewhere and v9 dependencies are similar enough to 10.x and main).NOTE 2: This PR also MIGHT solve
dependabotissues we are seeing in recent PRs like #6161. That's where this work all started...but the exact process thatdependabotuses to create new PRs is a bit mysterious to me still. So, it may not be a complete solution.Instructions for Reviewers
npm install. Verify you no longer see the aboveERESOLVEwarningsnpm run build:mirador(especially with Node v22.20+) and verify the build process now succeeds. Previously it failed immediately.mirador-share-pluginstill works to allow you to copy IIIF manifest information to share.)AI Disclosure
I used Claude Code to help determine the source of both issues. Initially, I was trying to solve the first issue (
npm installbug), and when I went to test the solution, I ran into the second issue. While the AI initially gave some incomplete, inaccurate advice for theERESOLVEerrors, I was able to build the solution to the first issue (npm install) via these discussions. The second issue was pinpointed directly by AI, but I fully tested the solution to ensure IIIF still functions properly.This PR description is fully written by me & all code fully reviewed & tested by me (including re-deploying and verifying that Mirador and IIIF integration work as expected).