Updating Next
Unanswered
Gazami crab posted this in #help-forum
Gazami crabOP
✔ 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 (/.../.npm/_npx/6a090669e21b4303/node_modules/@next/codemod/bin/upgrade.js:62:36)
at runUpgrade (/.../.npm/_npx/6a090669e21b4303/node_modules/@next/codemod/bin/upgrade.js:197:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command.<anonymous> (/.../.npm/_npx/6a090669e21b4303/node_modules/@next/codemod/bin/next-codemod.js:51:9)
What might be a problem?
✔ 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 (/.../.npm/_npx/6a090669e21b4303/node_modules/@next/codemod/bin/upgrade.js:62:36)
at runUpgrade (/.../.npm/_npx/6a090669e21b4303/node_modules/@next/codemod/bin/upgrade.js:197:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command.<anonymous> (/.../.npm/_npx/6a090669e21b4303/node_modules/@next/codemod/bin/next-codemod.js:51:9)
What might be a problem?
1 Reply
Gazami crabOP
Used this command
npx @next/codemod@canary upgrade latest
npx @next/codemod@canary upgrade latest