Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/warm-forks-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/cli': minor
---

fix:spinner not rendering properly during deps installation
20 changes: 16 additions & 4 deletions packages/cli/src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,22 @@ export async function runCreate(
}, 1000)

try {
const { execSync } = await import('node:child_process')
const installCmd =
packageManager === 'yarn' ? 'yarn' : `${packageManager} install`
execSync(installCmd, { cwd: targetDir, stdio: 'ignore' })
const { spawn } = await import('node:child_process')
const installCmd = packageManager === 'yarn' ? 'yarn' : packageManager
const args = packageManager === 'yarn' ? [] : ['install']
await new Promise<void>((resolve, reject) => {
const child = spawn(installCmd, args, {
cwd: targetDir,
stdio: 'ignore',
shell: true,
})
child.on('close', (code) => {
if (code === 0) resolve()
else reject(new Error(`Process exited with code ${code}`))
})
child.on('error', reject)
})

clearInterval(interval)
const total = Math.floor((Date.now() - startTime) / 1000)
s.stop(`Dependencies installed (${total}s)`)
Expand Down