-
-
Notifications
You must be signed in to change notification settings - Fork 916
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Affected package
Steps to reproduce
Problem: When installing [email protected] 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 - [email protected] works perfectly fine in the same setup. Tested with forcefully cleaning npm modules and cache.
Comparison Test:
- [email protected]: ✅ Works fine, all dependencies installed correctly
- [email protected]: ❌ Missing dependencies, requires --legacy-peer-deps workaround
Workaround: Installing with npm install [email protected] --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 [email protected] 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
Package manager
Operating system
Windows
Build and bundle tools
Next.js