Initial checklist
Affected package
react-markdown@10.1.0
Steps to reproduce
Problem: When installing react-markdown@10.1.0 in an npm workspace (monorepo), the package's regular dependencies are not being installed, causing build failures with "Module not found" errors for packages like hast-util-to-jsx-runtime, html-url-attributes, unified, etc.
This is a regression - react-markdown@9.1.0 works perfectly fine in the same setup. Tested with forcefully cleaning npm modules and cache.
Comparison Test:
- react-markdown@9.1.0: ✅ Works fine, all dependencies installed correctly
- react-markdown@10.1.0: ❌ Missing dependencies, requires --legacy-peer-deps workaround
Workaround: Installing with npm install react-markdown@10.1.0 --legacy-peer-deps correctly installs all dependencies.
I might be completely missing something out, or it might be a local issue, but I've just spent the last few hours digging into this, and it seems to really not work when upgrading (and it does when downgrading).
Steps to Reproduce:
- Create an npm workspace setup
- Install react-markdown@10.1.0 using npm install react-markdown --workspace=@workspace/name
- Try to build/import react-markdown
- See "Module not found" errors for dependencies
Actual behavior
Regular dependencies like hast-util-to-jsx-runtime, html-url-attributes, unified, etc. are missing from node_modules, causing module resolution failures.
Expected behavior
All dependencies listed in react-markdown's package.json should be automatically installed (like in v9.x).
Runtime
node@22.4.0
Package manager
npm@10.8.1
Operating system
Windows
Build and bundle tools
Next.js
Initial checklist
Affected package
react-markdown@10.1.0
Steps to reproduce
Problem: When installing react-markdown@10.1.0 in an npm workspace (monorepo), the package's regular dependencies are not being installed, causing build failures with "Module not found" errors for packages like hast-util-to-jsx-runtime, html-url-attributes, unified, etc.
This is a regression - react-markdown@9.1.0 works perfectly fine in the same setup. Tested with forcefully cleaning npm modules and cache.
Comparison Test:
Workaround: Installing with npm install react-markdown@10.1.0 --legacy-peer-deps correctly installs all dependencies.
I might be completely missing something out, or it might be a local issue, but I've just spent the last few hours digging into this, and it seems to really not work when upgrading (and it does when downgrading).
Steps to Reproduce:
Actual behavior
Regular dependencies like hast-util-to-jsx-runtime, html-url-attributes, unified, etc. are missing from node_modules, causing module resolution failures.
Expected behavior
All dependencies listed in react-markdown's package.json should be automatically installed (like in v9.x).
Runtime
node@22.4.0
Package manager
npm@10.8.1
Operating system
Windows
Build and bundle tools
Next.js