Error when creating new project
Problem
When I run dx new <project-name>, I get
? Which sub-template should be expanded? ›
❯ Bare-Bones
Jumpstart
Workspace
ERROR dx new: IO error: Incorrect function. (os error 1)
The error appears immediately after I enter the command and before I get to choose any of the sub-templates that are printed to the terminal.
Steps To Reproduce
While I'm not sure this works for everyone, this is what I do in Git Bash on my Windows 10 Home machine (if at any point Git Bash can't find the command you are trying to run, restart Git Bash and retry running the command):
- Install Rust by downloading and running "rustup-init.exe" by clicking on the "Download rustup-init.exe (x64)" butting on the Install Rust page. Choose the default settings during the installation.
- Start Git Bash and run (according to the Getting Started page)
rustup toolchain install stable rustup target add wasm32-unknown-unknown - Install Dioxus by running
curl -sSL https://dioxus.dev/install.sh > install.sh ./install.sh - Try to create a new Dioxus project by running
cd /path/to/the/parent/folder/of/the/new/project/ dx new my-dioxus-project
Expected behavior
When taking the steps outlined in the Steps To Reproduce section, I get the terminal output described in the Problem section.
Environment:
- Dioxus version:
dioxus 0.7.2 (35351eb) - Rust version:
rustup 1.28.2 (e4f3ad6f8 2025-04-28) - OS info: Microsoft Windows 10 Home
- App platform: N/A (the error occurs before I have got to choose a default platform to serve)
Does anyone have any idea of what could be the cause of this? How can this be debugged?
Hello? Does anyone have any idea of what could be the cause of this problem? Or how I can start to debug this myself? Do I need to build Dioxus from source to be able to debug it?
I haven't seen that error before, but the first step to debugging it would be rerunning with more verbose logs: dx new --trace --verbose testing
If that doesn't yield anything useful, most of the IO operations we do during dx new are from cargo generate. Trying to reproduce the issue with just the cargo generate cli and the dioxus template repo would help narrow down the issue