npm install fails with ERESOLVE peer dependency conflict on react-dom/streamdown
name: Bug report about: Create a report to help us improve title: 'npm install fails with ERESOLVE peer dependency conflict on react-dom/streamdown' labels: bug assignees: ''
Describe the bug
Running npx next-forge@latest init fails during the Installing dependencies step when using npm due to an ERESOLVE peer dependency conflict in packages/ai.
In packages/ai/package.json, streamdown requires peer react-dom@"^18.0.0 || ^19.0.0". Because react-dom is missing from packages/ai's dependencies (only react: "19.2.4" is declared), npm resolves the latest matching react-dom (e.g. 19.2.8), which requires peer react@"^19.2.8". This conflicts with the pinned react@"19.2.4" across the workspace.
next-forge version I am using version 6.0.2 (latest).
To Reproduce Steps to reproduce the behavior:
- Run
npx next-forge@latest init - Enter project name (e.g.
my-project) - Select
npmas the package manager (or let npm be auto-detected) - See error:
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: @repo/[[email protected]](mailto:[email protected])
npm error Found: [[email protected]](mailto:[email protected])
npm error node_modules/react
npm error react@"19.2.4" from @repo/[[email protected]](mailto:[email protected])
npm error packages/ai
npm error @repo/[[email protected]](mailto:[email protected])
npm error node_modules/@repo/ai
npm error workspace packages/ai from the root project
npm error peer react@"^18.0.0 || ^19.0.0" from [[email protected]](mailto:[email protected])
npm error node_modules/streamdown
npm error streamdown@"^2.4.0" from @repo/[[email protected]](mailto:[email protected])
npm error
npm error Could not resolve dependency:
npm error peer react@"^19.2.8" from [[email protected]](mailto:[email protected])
npm error node_modules/react-dom
npm error peer react-dom@"^18.0.0 || ^19.0.0" from [[email protected]](mailto:[email protected])
npm error node_modules/streamdown
npm error streamdown@"^2.4.0" from @repo/[[email protected]](mailto:[email protected])Expected behavior
npm install should complete successfully without dependency resolution errors during project initialization.
Suggested Fix
Add "react-dom": "19.2.4" to dependencies in packages/ai/package.json to keep react and react-dom aligned:
{
"dependencies": {
"react": "19.2.4",
"react-dom": "19.2.4",
"streamdown": "^2.4.0"
}
}Desktop (please complete the following information):
- OS: macOS (Darwin)
- Node.js: >=18
- Package Manager: npm (10.x)
Source: vercel/next-forge