Upgrading to NextJs 15
Answered
Tonkinese posted this in #help-forum
TonkineseOP
When i try to upgrade to nextjs 15 using " npm i @codemod@ canary upgrade latest"
i get this error "React: v18.3.1Next.js: v14.2.13 SyntaxError: Unexpected end of JSON input at JSON.parse () at loadHighestNPMVersionMatching"
How can i fix it
i get this error "React: v18.3.1Next.js: v14.2.13 SyntaxError: Unexpected end of JSON input at JSON.parse () at loadHighestNPMVersionMatching"
How can i fix it
Answered by flap
@Tonkinese You should be using npx and not npm, the correct syntax is as follows:
To upgrade to 15.0.2-canary.6 run
npx @next/codemod@canary upgrade latest
. This will upgrade to 15.0.1.To upgrade to 15.0.2-canary.6 run
npx @next/codemod@canary upgrade 15.0.2-canary.6
2 Replies
@Tonkinese You should be using npx and not npm, the correct syntax is as follows:
To upgrade to 15.0.2-canary.6 run
npx @next/codemod@canary upgrade latest
. This will upgrade to 15.0.1.To upgrade to 15.0.2-canary.6 run
npx @next/codemod@canary upgrade 15.0.2-canary.6
Answer
TonkineseOP