#Upgrading from next 14 to 15
1 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
canary versions have experimental or new features, if you don't want to test any specific one, you can try this to go to next 15 stable version
npx @next/codemod@latest upgrade latest
this shows the same options
Detected installed versions:
- React: v18.3.1
- Next.js: v14.2.3
√ Enable Turbopack for next dev? ... yes
? The following codemods are recommended for your upgrade. Select the ones to apply. »
Instructions:
↑/↓: Highlight option
←/→/[space]: Toggle selection
a: Toggle all
enter/return: Complete answer
(*) (v15.0.0-canary.179) app-dir-runtime-config-experimental-edge
Transform App Router Route Segment Config `runtime` value from `experimental-edge`
to `edge`
(*) (v15.0.0-canary.171) next-async-request-api
(*) (v15.0.0-canary.153) next-request-geo-ip```
you can choose the last one and if you don't like it you can always manually change the package.json to next 15 and react 19 after
Got new errors
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: event-ms@0.1.0
npm error Found: date-fns@4.1.0
npm error node_modules/date-fns
npm error date-fns@"^4.1.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer date-fns@"^2.28.0 || ^3.0.0" from react-day-picker@8.10.1
npm error node_modules/react-day-picker
npm error react-day-picker@"8.10.1" 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.```
delete node_modules, delete package-LOCK.json and npm install --legacy-peer-deps
Why there are some missing modules like this Cannot find module 'next/navigation' or its corresponding type declarations after running npm install --legacy-peer-deps?
try reloading vscode, sometimes it bugs and show missing modules when you uninstall and re install, its just a visual red error but everything runs fine