You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// To reduce user-side burden of selecting which codemods to run as it needs additional
@@ -354,12 +356,12 @@ function getInstalledNextVersion(): string {
354
356
try{
355
357
returnrequire(
356
358
require.resolve('next/package.json',{
357
-
paths: [process.cwd()],
359
+
paths: [cwd],
358
360
})
359
361
).version
360
362
}catch(error){
361
363
thrownewBadInput(
362
-
`Failed to get the installed Next.js version at "${process.cwd()}".\nIf you're using a monorepo, please run this command from the Next.js app directory.`,
364
+
`Failed to get the installed Next.js version at "${cwd}".\nIf you're using a monorepo, please run this command from the Next.js app directory.`,
363
365
{
364
366
cause: error,
365
367
}
@@ -371,12 +373,12 @@ function getInstalledReactVersion(): string {
371
373
try{
372
374
returnrequire(
373
375
require.resolve('react/package.json',{
374
-
paths: [process.cwd()],
376
+
paths: [cwd],
375
377
})
376
378
).version
377
379
}catch(error){
378
380
thrownewBadInput(
379
-
`Failed to detect the installed React version in "${process.cwd()}".\nIf you're working in a monorepo, please run this command from the Next.js app directory.`,
381
+
`Failed to detect the installed React version in "${cwd}".\nIf you're working in a monorepo, please run this command from the Next.js app directory.`,
0 commit comments