dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Error when creating new project

Open krikru opened this issue 2 months ago • 3 comments

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):

  1. 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.
  2. Start Git Bash and run (according to the Getting Started page)
    rustup toolchain install stable
    rustup target add wasm32-unknown-unknown
    
  3. Install Dioxus by running
    curl -sSL https://dioxus.dev/install.sh > install.sh
    ./install.sh
    
  4. 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)

krikru avatar Dec 28 '25 00:12 krikru

Does anyone have any idea of what could be the cause of this? How can this be debugged?

krikru avatar Dec 29 '25 23:12 krikru

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?

krikru avatar Jan 06 '26 20:01 krikru

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

ealmloff avatar Jan 08 '26 14:01 ealmloff