Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"jszip": "^3.10.1",
"katex": "^0.17.0",
"next": "16.2.6",
"react": "19.2.6",
"react": "19.2.7",
"react-dom": "19.2.6",
Comment on lines +28 to 29
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚖️ Poor tradeoff

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if react-dom 19.2.7 is available on npm
echo "Checking react-dom versions..."
npm view react-dom versions --json | jq '.[-10:]'

echo -e "\nChecking latest react-dom version..."
npm view react-dom version

echo -e "\nChecking react-dom@19.2.7 specifically..."
npm view react-dom@19.2.7 version 2>&1

echo -e "\nChecking react 19.2.7 release date..."
npm view react@19.2.7 time

echo -e "\nChecking react-dom 19.2.6 release date..."
npm view react-dom@19.2.6 time

Repository: OpenDevFlow/md-latex

Length of output: 50377


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant deps in the current package.json
echo "=== apps/web/package.json (relevant lines) ==="
sed -n '20,60p' apps/web/package.json | nl -ba

# Check if there's a lockfile and what react/react-dom versions are locked
echo
echo "=== Lockfile react/react-dom versions (if present) ==="
for f in pnpm-lock.yaml yarn.lock package-lock.json npm-shrinkwrap.json; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    # Print only lines mentioning react/react-dom to keep output small
    rg -n '"?(react-dom|react)@' "$f" || true
    rg -n '"?(react-dom|react)"?\s*:\s*"' "$f" || true
    rg -n 'react-dom:\s*' "$f" || true
    rg -n 'react:\s*' "$f" || true
  fi
done

# Also try workspace-level lockfiles if common patterns exist
for f in apps/web/pnpm-lock.yaml apps/web/yarn.lock apps/web/package-lock.json; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    rg -n '"?(react-dom|react)@' "$f" || true
  fi
done

Repository: OpenDevFlow/md-latex

Length of output: 172


🌐 Web query:

React documentation recommendation: should react and react-dom versions match exactly (e.g., same minor/patch versions)?

💡 Result:

Yes, the react and react-dom packages must have the exact same version [1][2]. In modern versions of React, the packages are tightly coupled and rely on an internal protocol for shared features such as Hooks, the compiler runtime, and rendering APIs [1]. To ensure compatibility and prevent cryptic runtime errors, React now performs a version check during module initialization [1]. If the versions do not match, the application will throw an error immediately, such as: "Incompatible React versions: The 'react' and 'react-dom' packages must have the exact same version" [2]. To avoid this, you should ensure that both packages are updated to the same version in your package.json [2]. If you encounter unexpected version mismatches in your project, it is often due to package manager resolution issues where different versions are installed despite being listed in your configuration; running a fresh install or checking your lockfile is the recommended way to resolve these conflicts [2].

Citations:


Fix React/react-dom version mismatch (must be the exact same version)

apps/web/package.json sets react to 19.2.7 while react-dom remains on 19.2.6:

"react": "19.2.7",
"react-dom": "19.2.6",

React requires react and react-dom to have the exact same version and will throw an “Incompatible React versions” error when they don’t match. react-dom@19.2.7 is available on npm, so update react-dom to 19.2.7 to align them.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/package.json` around lines 28 - 29, The package.json currently
specifies mismatched React versions: "react" is 19.2.7 while "react-dom" is
19.2.6; update the "react-dom" entry to exactly "19.2.7" so both "react" and
"react-dom" match (ensure package.json's "react-dom" value equals the "react"
value and then run your install to update lockfiles).

"rehype-katex": "^7.0.1",
"rehype-stringify": "^10.0.1",
Expand Down
52 changes: 26 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading