Cannot install next@rc
Answered
jsoneaday posted this in #help-forum
Just tried installing and getting this error.
I've tried adding a .npmrc file with the legacy-peer-deps=true flag but still not working.
web15 % npm i --save-exact next@rc react@rc react-dom@rc
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: web15@1.0.0
npm error Found: react@19.0.0-rc-58af67a8f8-20240628
npm error node_modules/react
npm error react@"19.0.0-rc-58af67a8f8-20240628" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"19.0.0-rc-f994737d14-20240522" from next@15.0.0-rc.0
npm error node_modules/next
npm error next@"15.0.0-rc.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.I've tried adding a .npmrc file with the legacy-peer-deps=true flag but still not working.
Answered by jsoneaday
Not sure if this will build the project in terms of once I get coding but I was able to at least get the deps installed by adding this to my package.json.
"dependencies": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"next": "15.0.0-rc.0",
"react": "19.0.0-rc-58af67a8f8-20240628",
"react-dom": "19.0.0-rc-58af67a8f8-20240628"
},
"overrides": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc"
},
"devDependencies": {
"typescript": "^5.5.2"
}1 Reply
Not sure if this will build the project in terms of once I get coding but I was able to at least get the deps installed by adding this to my package.json.
"dependencies": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"next": "15.0.0-rc.0",
"react": "19.0.0-rc-58af67a8f8-20240628",
"react-dom": "19.0.0-rc-58af67a8f8-20240628"
},
"overrides": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc"
},
"devDependencies": {
"typescript": "^5.5.2"
}Answer