Create with Storybook add-on hangs on pnpm 11 under “Running commands for Storybook…”
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- node.js, storybook, typescript
调研方向
从 Storybook add-on 命令和包管理器翻译入手,然后跟踪 runCommandsAndInstallDependencies,查看子进程与 Clack spinner 是如何协调的。使用提供的 pnpm 11 命令在真实 TTY 中复现,并验证 Storybook 设置是否完成,或显示 approve-builds prompt,而不是看起来像是卡住了。
由索引模型根据 Issue 内容生成。
描述
Which project does this relate to?
Create Tanstack App
Describe the bug
If I run TanStack create with the Storybook add-on on pnpm 11, the CLI can appear to hang forever on:
Running commands for Storybook...
Example (same shape as other create reports; adjust version/flags as needed):
pnpm dlx @tanstack/cli@latest create tanstack-app \
--framework react \
--add-ons storybook \
--no-git \
-y
The create spinner never finishes that step. What’s actually happening is that TanStack runs the Storybook add-on command (npx storybook init -y --no-dev → pnpm dlx storybook … for pnpm users) with the spinner still active. On pnpm 11 (TTY + cold dlx cache), pnpm waits for interactive approve-builds input for esbuild, but that prompt is easy to miss under the spinner — so the TanStack CLI looks stuck.
This is a TanStack create UX/invocation issue: the parent owns the spinner and how the child is launched. Storybook’s JS has not started yet when the prompt appears, so Storybook cannot surface or answer it.
Related background (investigation from the Storybook side): https://github.com/storybookjs/storybook/issues/35668
Related (same pnpm 11 build-approval theme, different failure mode — hard ERR_PNPM_IGNORED_BUILDS instead of a hang): https://github.com/TanStack/cli/issues/484
Your Example Website or App
N/A as a hosted app — this is a local TanStack CLI create hang and needs a real TTY (StackBlitz / non-TTY environments won’t show the same interactive approve-builds path).
Repro is the TanStack create command above (or interactive pnpm dlx @tanstack/cli@latest create choosing React + Storybook on pnpm 11).
Steps to Reproduce the Bug or Issue
- Use pnpm 11+ in a real terminal (TTY).
- Optionally clear the pnpm dlx cache so the approve-builds path is more likely:
rm -rf "$(dirname "$(pnpm store path)")/dlx" - Run TanStack create with the Storybook add-on, e.g.:
pnpm dlx @tanstack/cli@latest create tanstack-app \
--framework react \
--add-ons storybook \
--no-git \
-y
- See the CLI sit on
Running commands for Storybook.../ appear hung. - If you look carefully at the terminal (or pause the spinner), pnpm may be waiting on an approve-builds prompt for esbuild.
Expected behavior
As a user, I expected TanStack create to finish (or show a clear prompt I can answer). Instead it looks stuck on “Running commands for Storybook…” while the child is waiting on stdin.
Screenshots or Videos
No response
Platform
- OS: macOS (also reported on other setups via the linked Storybook issue)
- Browser: N/A (CLI)
- pnpm: 11.18.0
- Node: 22+ / 24 (see https://github.com/storybookjs/storybook/issues/35668)
Additional context
Why this is on TanStack: create launches the Storybook add-on command and keeps the Clack spinner up for the whole child lifetime. Fixing visibility and/or passing pnpm allow-build flags is in that path (storybook add-on command + package-manager translation + runCommandsAndInstallDependencies).
Workaround for the underlying pnpm step (verified): if you run the child yourself,
pnpm --allow-build=esbuild dlx storybook@latest init -y --no-dev
Suggested fixes:
- When the package manager is pnpm, run the Storybook add-on command as
pnpm --allow-build=esbuild dlx storybook init -y --no-dev(flag beforedlx). - Pause/stop the spinner when the child may need a TTY so pnpm’s approve-builds UI is visible.
- Document the workaround until (1) lands.
- 主要语言
- TypeScript
- 星标
- 1.3k
- 派生
- 185
- 平均合并
- 18 小时 45 分钟
- 30 天内合并 PR
- 2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/cli 的其他 Issue
-
create: scaffold's unlayered body styles defeat its own @layer base rules (and any shadcn theme) 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
enhancement
难度 5/5 一周以上 新手友好度 45/100
-
enhancement
难度 3/5 1-2 天 新手友好度 58/100
-
难度 3/5 1-2 天 新手友好度 68/100
相似的 Issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 70/100