Stuck in Vite Project Creation Prompt in WebContainer
Issue Description
I’m trying to create a new Vite project in WebContainer (Stackblitz-like environment), but I’m stuck in an interactive prompt that I can’t navigate:
npx create-vite@latest . --template react --yes
npm WARN exec The following package was not found and will be installed: create-vite@6.1.0
? Current directory is not empty. Please choose how to proceed: › - Use arrow-keys. Return to submit.
❯ Cancel operation
Remove existing files and continue
Ignore files and continue
The arrow keys don’t work, and I can’t select any option. This seems to be a limitation of the WebContainer environment.
Environment
- WebContainer environment
- Trying to create a Vite + React project
- Using
npx create-vite@latest
Question
Has anyone encountered this issue in WebContainer? What’s the recommended way to:
- Either bypass the interactive prompt
- Or create a Vite project from scratch in WebContainer
- Or handle directory cleanup in this environment
Any workarounds or alternative approaches would be greatly appreciated!
#webcontainer #vite #troubleshooting