DioxusLabs / DioxusLabs/dioxus-components
dx component add fails to add component
- Dominant language
- Rust
- Stars
- 343
- Forks
- 82
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
I've started a new project (`dx new`) with `workspace`.
I get this error when trying to add the `button` component.
```console
$ dx components add button
ERROR dx components: Failed to find binary package to build.
You need to either run dx from inside a binary crate or specify a binary package to build with the `--package` flag. Try building again with one of the binary packages in the workspace:
- desktop
- mobile
- web
```
I've tried adding `--module-path packages/ui` with no success
Edit:
If I `cd packages/ui/` it does work, but it leaves me confused with the output:
```
Created new components module at /home/woile/projects/reciperium/sweetstrike/packages/ui/src/components.
To finish setting up components, you will need to:
- manually reference the module by adding `mod components;` to your `main.rs` file
- add a reference to `asset!("/assets/dx-components-theme.css")` as a stylesheet in your app
```
`ui` doesn't have a `main.rs` but a `lib.rs`, wher eshould I add the theme? on every target (web, desktop and mobile)?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.