fix(create): stop forwarding -- to npx-invoked remote templates#1421
Merged
fengmk2 merged 1 commit intovoidzero-dev:mainfrom Apr 20, 2026
Merged
fix(create): stop forwarding -- to npx-invoked remote templates#1421fengmk2 merged 1 commit intovoidzero-dev:mainfrom
-- to npx-invoked remote templates#1421fengmk2 merged 1 commit intovoidzero-dev:mainfrom
Conversation
`formatDlxCommand` injected `--` between the package name and its args on the npx path, producing `npx <pkg> -- <args>`. Per the npm v8 `npx` docs, the documented form places `--` before the package name; the trailing `--` is forwarded to the underlying binary. Commander-based subcommand CLIs (e.g., `@tanstack/cli create`) interpret it as end-of-options and promote subsequent flags into positionals, exceeding the subcommand's arity. Drop the `--` injection for npx; pnpm/yarn/bun paths unchanged.
✅ Deploy Preview for viteplus-preview canceled.
|
Collaborator
Author
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Member
|
@codex review |
fengmk2
approved these changes
Apr 20, 2026
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1420.
Summary
vp create @tanstack/startfails witherror: too many arguments for 'create'. Expected 1 argument but got 2.on npm (reproducible on macOS and Windows, not platform-specific as originally reported).Root cause
formatDlxCommandinjected--between the package name and its args on the npx path (npx <pkg> -- <args>). Per the npm v8npxdocs,--belongs before the package name; when placed after, npx forwards it to the target binary. Commander then treats it as end-of-options and promotes subsequent flags into positional args — exceeding@tanstack/cli create [project-name]'s arity of 1.Single-entry CLIs (
create-vite,create-nuxt,sv) absorbed the stray--harmlessly, which is why this surfaced only after #1238 switched to the Commander-based@tanstack/cli create. Fix drops the--from the npx branch; non-npx runners unchanged.Verification
Manual smoke in scratch directories with npm and pnpm:
vp create @tanstack/start— TanStackcreateinteractive prompt reached (fix verified for too many arguments for 'create' error when running vp create @tanstack/start #1420).vp create vite—create-viteprompt reached (blast-radius check).vp create nuxt—create-nuxtprompt reached (blast-radius check).