Skip to content

dx component add fails to add component #183

@woile

Description

@woile

Hi there,

I've started a new project (dx new) with workspace.

I get this error when trying to add the button component.

$ 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)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions