Error Upgrading from 14 to 15
Unanswered
shadow posted this in #help-forum
shadowOP
whats wrong?
npx @next/codemod@latest upgrade
Need to install the following packages:
@next/codemod@15.0.0
Ok to proceed? (y) y
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
Detected installed versions:
- React: v18.2.0
- Next.js: v14.2.15
√ The following codemods are recommended for your upgrade. Select the ones to apply. » (v15.0.0-canary.179) app-dir-runtime-config-experimental-edge, (v15.0.0-canary.171) next-async-request-api, (v15.0.0-canary.153) next-request-geo-ip, (v15.0.0-canary.44) next-dynamic-access-named-export
√ Would you like to run the React 19 upgrade codemod? ... yes
√ Would you like to run the React 19 Types upgrade codemod? ... yes
SyntaxError: Unexpected non-whitespace character after JSON at position 4
at JSON.parse (<anonymous>)
at loadHighestNPMVersionMatching (C:\Users\****\AppData\Local\npm-cache\_npx\04c93779852ad6b7\node_modules\@next\codemod\bin\upgrade.js:63:36)
at runUpgrade (C:\Users\****\AppData\Local\npm-cache\_npx\04c93779852ad6b7\node_modules\@next\codemod\bin\upgrade.js:197:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command.<anonymous> (C:\Users\****\AppData\Local\npm-cache\_npx\04c93779852ad6b7\node_modules\@next\codemod\bin\next-codemod.js:51:9)