Skip to content

Commit

Permalink
next-codemod(upgrade): handle absence of scripts in package.json (#73688
Browse files Browse the repository at this point in the history
)
  • Loading branch information
petter authored Dec 9, 2024
1 parent bb4ddae commit 6aceae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next-codemod/bin/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ async function suggestTurbopack(
packageJson: any,
targetNextVersion: string
): Promise<void> {
const devScript: string = packageJson.scripts['dev']
const devScript: string | undefined = packageJson.scripts?.['dev']
// Turbopack flag was changed from `--turbo` to `--turbopack` in v15.0.1-canary.3
// PR: https://github.com/vercel/next.js/pull/71657
// Release: https://github.com/vercel/next.js/releases/tag/v15.0.1-canary.3
Expand Down

0 comments on commit 6aceae2

Please sign in to comment.