dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

dx serve: Failed to find current package dioxus 0.6.1

Open sirus20x6 opened this issue 11 months ago • 1 comments

Problem

 /run/media/sirus/aux/code/git  dx new hot_dog                                                                                  ✔  markitdown    12:14:10
✔ 🤷   Which sub-template should be expanded? · Workspace
✔ 🤷   Do you want to use Dioxus Fullstack? · true
✔ 🤷   Do you want to use Dioxus Router? · true
   7.109s  INFO Generated project at /run/media/sirus/aux/code/git/hot_dog

`cd` to your project and run `dx serve` to start developing.
If using Tailwind, make sure to run the Tailwind CLI.
More information is available in the generated `README.md`.

Build cool things! ✌️
 /run/media/sirus/aux/code/git  cd hot_dog                                                                                 ✔  7s  markitdown    12:14:18
 /run/media/sirus/aux/code/git/hot_dog  dx serve                                                                                ✔  markitdown    12:14:22
zsh: correct 'serve' to 'server' [nyae]? n
   2.665s ERROR Loading crate
   2.665s ERROR err=Other(Failed to find current package)
 /run/media/sirus/aux/code/git/hot_dog  dx --version                                                                          1 ✘  markitdown    12:14:37
dioxus 0.6.1 (was built without git repository)

Screenshots

image

Environment:

  • Dioxus version: 0.6.1
  • Rust version: cargo 1.83.0 (5ffbef321 2024-10-29) rustc 1.83.0 (90b35a623 2024-11-26)
  • OS info: manjaro/arch
  • App platform: whatever the default is from your tutorial

sirus20x6 avatar Dec 30 '24 18:12 sirus20x6

When you're using the Workspace template with fullstack, you have to specify which package you want to use: e.g. dx serve --package web

ousado avatar Jan 02 '25 14:01 ousado

I tested for the Dioxus 0.6.3 CLI and we have a better error message for this now. In the future, we may want a mechanism for serving a default binary.

DogeDark avatar Mar 01 '25 00:03 DogeDark