Skip to content

Commit 52127b3

Browse files
committed
feat(create): explain when vp create @org falls through silently
When a user types `vp create @org` expecting the picker but `@org/create` has no `vp.templates` manifest, emit a one-line `info:` note before falling through to run `@org/create` as a normal package: No `vp.templates` manifest in @org/create — running it as a normal package. Without this, a later `ERR_PNPM_DLX_NO_BIN` (the typical failure when `@org/create` is data-only, as with `@eggjs/create`) looks mysterious — the user has no way to know the picker was attempted and skipped. Triggered only for scope-only input (`vp create @org`). The per-entry form (`vp create @org/name`) stays silent because it's ambiguous — the user might have genuinely wanted `@org/create-name` via the existing shorthand. Also helps diagnose registry-mirror sync lag: if a user's mirror hasn't synced a just-published manifest, they now see "no manifest" instead of the downstream dlx failure. Reported by @fengmk2 on #1398 after `vp create @eggjs` in a monorepo showed the monorepo parent-dir prompt and then `pnpm dlx @eggjs/create` without ever running the picker.
1 parent 92c9a05 commit 52127b3

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packages/cli/src/create/org-resolve.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ export async function resolveOrgManifestForCreate(args: {
131131
}
132132

133133
if (!manifest) {
134+
// Scope-only input (`vp create @org`) strongly implies the user
135+
// expected the picker. Be explicit about why it didn't engage, so a
136+
// later `ERR_NO_BIN` from the package manager doesn't look mysterious.
137+
// Per-entry `vp create @org/name` stays silent since it's ambiguous.
138+
if (orgSpec.name === undefined) {
139+
prompts.log.info(
140+
`No \`vp.templates\` manifest in ${orgSpec.scope}/create — running it as a normal package.`,
141+
);
142+
}
134143
return { kind: 'passthrough' };
135144
}
136145

0 commit comments

Comments
 (0)