diff --git a/packages/next-codemod/bin/upgrade.ts b/packages/next-codemod/bin/upgrade.ts index dc2f7f3163803..973a1ff7c941b 100644 --- a/packages/next-codemod/bin/upgrade.ts +++ b/packages/next-codemod/bin/upgrade.ts @@ -412,7 +412,7 @@ function isUsingAppDir(projectPath: string): boolean { */ async function suggestTurbopack(packageJson: any): Promise { const devScript: string = packageJson.scripts['dev'] - if (devScript.includes('--turbopack')) return + if (devScript?.includes('--turbopack')) return const responseTurbopack = await prompts( {