#how to update to next js 15.1 from nextjs 15.
1 messages · Page 1 of 1 (latest)
Hi @polar crow. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
To update from Next.js 15 to 15.1, you should typically be able to use the standard npm update command. However, since you're encountering an npm error, it's likely due to peer dependency conflicts, which are common when updating to newer versions of Next.js, especially with pre-release versions of React.
Based on the information from the Next.js 15 Upgrade Guide (https://nextjs.org/docs/app/building-your-application/upgrading/version-15), here are some steps you can try:
-
First, ensure you're using the latest versions of React and React DOM:
npm i next@latest react@latest react-dom@latest eslint-config-next@latest -
If you see peer dependency warnings, you might need to use the
--forceor--legacy-peer-depsflag:npm i next@latest react@latest react-dom@latest eslint-config-next@latest --force -
If you're using TypeScript, make sure to also upgrade
@types/reactand@types/react-domto their latest versions. -
If you're still encountering issues, you can try using the
upgradecodemod:npx @next/codemod@canary upgrade latest
If you continue to face errors, it would be helpful to see the specific npm error message you're receiving. Some users have reported success by adding overrides to their package.json:
"overrides": {
"react": "$react",
"react-dom": "$react-dom"
}
Remember, these are temporary solutions until both Next.js 15 and React 19 are stable. If you're working on a production application, it might be safer to wait for the stable release before updating.