Repository navigation
Align React with scalajs-react 4.0.0 (fixes crash after login) - #11
Merged
Merged
Conversation
zio-auth 3.1.7 pulls scalajs-react 4.0.0, which targets React 19, and the
VersionScheme.Always schemes let it silently evict web's 3.0.0 while
web/package.json still installed React 18. The app crashed in React's
commit phase right after login ("TypeError: V is not a function").
- web/package.json: React/react-dom 19, with overrides for semantic-ui-react's
React <= 18 peer range
- web/react-dom-compat.js + vite alias: restore ReactDOM.findDOMNode, which
React 19 removed and semantic-ui-react's <Ref> still calls (same shim as
meal-o-rama)
- build.sbt: scalajsReactVersion 4.0.0, stale eviction comment removed
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FUquyESPidPbweqpxTG2ge
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.
Problem
After logging in, the app crashed with
TypeError: V is not a functioninsidereact-dom.production.min.js.zio-auth 3.1.7 pulls in scalajs-react 4.0.0, which is written for React 19.
build.sbtasked for 3.0.0, but theVersionScheme.Alwaysschemes let 4.0.0 win silently. Meanwhileweb/package.jsonstill installed React 18.3.1. meal-o-rama, dmscreen and jorlan are already on React 19 with scalajs-react 4.0.0; chuti was the only one mismatched.Changes
web/package.json: React and react-dom^19.2.0(resolves to 19.3.0). Adds npmoverrides, because semantic-ui-react 2.1.5, the latest release, still declares a React <= 18 peer range.web/react-dom-compat.js(new) plus aresolve.aliasinweb/vite.config.js: restoresReactDOM.findDOMNode, which React 19 removed and semantic-ui-react's<Ref>(via@fluentui/react-component-ref) still calls. It is the same workaround meal-o-rama uses. react-dom 19.3 still includes the function internally.build.sbt:scalajsReactVersionis now 4.0.0, with a comment that it must move together withpackage.json. Removes a stale eviction comment.Testing
sbt web/webDistbuilds. The bundle contains React 19.3.0 and the shim.🤖 Generated with Claude Code
https://claude.ai/code/session_01FUquyESPidPbweqpxTG2ge