shadcn-ui/ui · info
Migration cancelled.
Error message
Migration cancelled.
What it means
Before writing any files, migrateCn shows an interactive confirmation prompt summarizing how many files will change and how many items need manual review. If the user answers no (confirm is falsy), the CLI logs `Migration cancelled.` and returns normally — no error is thrown and no files or dependencies are modified.
Source
Thrown at packages/shadcn/src/migrations/cn/index.ts:69
if (!changedFiles.length) {
logger.info("No supported clsx, tailwind-merge or cnfast usage found.")
printUnsupportedIssues(unsupported, options.cwd)
return
}
assertTailwindCompatibility(options.cwd, migratedPackages)
if (!options.yes) {
const { confirm } = await prompts({
type: "confirm",
name: "confirm",
initial: true,
message: `We will migrate ${highlighter.info(
changedFiles.length
)} file(s) to ${highlighter.info("cn")}${
unsupported.length
? ` and leave ${highlighter.warn(
unsupported.length
)} item(s) for manual review`
: ""
}. Continue?`,
})
if (!confirm) {
logger.info("Migration cancelled.")
return
}
}
const migrationSpinner = spinner("Migrating to cn...")?.start()
await installDependencies(options.cwd, ["cn"])
for (const { file, result } of changedFiles) {
await fs.writeFile(file, result.content)
}View on GitHub (pinned to 5c7072da67)
Solutions
- Rerun the migration and answer yes at the prompt to proceed.
- Use the `--yes` flag (yes: true) to skip the interactive confirmation in scripts/CI.
- If it cancelled unexpectedly in CI, that is the non-TTY prompt aborting — always pass --yes in headless environments.
Example fix
// before (CI, hangs/cancels at prompt)
await migrateCn({ cwd: process.cwd() })
// after
await migrateCn({ cwd: process.cwd(), yes: true }) Defensive patterns
Strategy: fallback
Try / catch
const result = await migrateCn({ cwd: process.cwd(), yes: isCI })
if (!result) logger.info('Migration was cancelled or produced no changes') Prevention
- Pass yes: true / --yes in CI or non-interactive shells.
- Review the proposed change counts before confirming interactively.
- Run on a clean git branch so cancellation has no cost.
When it happens
Trigger: Running migrateCn without `yes: true` and pressing n/Escape at the 'Continue?' confirm prompt, or the prompts library returning a falsy confirm (e.g. non-TTY cancellation).
Common situations: Reviewing the diff counts and deciding to back out; aborting after seeing a large number of manual-review items; CI running the command non-interactively where prompts aborts and confirm is undefined.
Related errors
- Failed to read config at ${options.cwd}.
- Missing value for --only. Use one or more of: ${APPLY_ONLY_V
- Invalid value for --only: ${value}. Use one or more of: ${AP
- Missing preset for --only. Use: shadcn apply <preset> --only
- Unknown client: ${client}. Available clients: ${CLIENTS.map(
AI-assisted analysis of shadcn-ui/ui@5c7072da67 (2026-09-07).
Data as JSON: /api/errors/2e837c57da544b4a.
Report an issue: GitHub.