Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next-codemod(upgrade): optional catch when missing dev script #71598

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
handle absence of dev script in upgrade codemod
  • Loading branch information
imprakharshukla committed Oct 22, 2024
commit 4375f7b301f662645dafc54e21df5e9e0c2de4d1
2 changes: 1 addition & 1 deletion packages/next-codemod/bin/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ function isUsingAppDir(projectPath: string): boolean {
*/
async function suggestTurbopack(packageJson: any): Promise<void> {
const devScript: string = packageJson.scripts['dev']
if (devScript.includes('--turbo')) return
if (devScript && devScript.includes('--turbo')) return

const responseTurbopack = await prompts(
{
Expand Down
Loading