Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use any icons. Everything up-to-date. #15

Closed
konyogony opened this issue Aug 13, 2024 · 2 comments
Closed

Cannot use any icons. Everything up-to-date. #15

konyogony opened this issue Aug 13, 2024 · 2 comments

Comments

@konyogony
Copy link

konyogony commented Aug 13, 2024

Hi! This is probably my inexperience but I have encountered an issue where I am unable to use any of the icons.

Here is my Cargo.toml file:

[package]
name = "kony-web"
version = "0.1.0"
edition = "2021"

[dependencies]
yew = "0.21"
web-sys = "0.3"
yew-router = "0.18"
yew_icons = {version = "0.8", features = ["BOOTSTRAP_DISCORD"]}

My navbar.rs:

use yew_icons::{Icon, IconId};
...some code
 html! {
        <div class="w-full bg-gray-500/20 flex flex-row items-center px-[24rem] py-4 gap-1 text-xl font-semibold backdrop-blur-sm border-b border-white/5 sticky top-0">
            {title_home}
            <div class="ml-auto flex flex-row gap-8 items-center text-base font-semibold">
                {home_nav}
                {discord_nav}
                <div class="w-[1.5px] rounded-md h-5 bg-white/5" />
                <Icon icon_id={IconId::BOOTSTRAP_DISCORD}/> // <-------- Error here
            </div>
        </div>
    }

Error in terminal:

2024-08-13T11:57:07.324305Z ERROR ❌ error
error from build pipeline

Caused by:
    0: error getting cargo metadata
    1: `cargo metadata` exited with an error:     Updating crates.io index
       error: failed to select a version for `yew_icons`.
           ... required by package `kony-web v0.1.0 (/home/kony/Documents/kony_clowning_2/tailwind-yew)`
       versions that meet the requirements `^0.8` (locked to 0.8.0) are: 0.8.0
       
       the package `kony-web` depends on `yew_icons`, with features: `BOOTSTRAP_DISCORD` but `yew_icons` does not have these features.
       
       
       failed to select a version for `yew_icons` which could resolve this conflict
       

Notes:

  • I dont have any more errors
  • Downgrading yew_icons doesnt help.

I would appreciate any help. Thanks in advance and I appologise if I am making some silly mistake

@konyogony
Copy link
Author

Found a solution! Had to change "BOOTSTRAP_DISCORD" => "BootstrapDiscord". Please consider changing all names in the gallery to match this format that actually works. I find this quite misleading and poorly executed.

@finnbear
Copy link
Owner

finnbear commented Aug 13, 2024

Thanks for reporting this. I am changing to UPPER_SNAKE_CASE on the constants_not_enum branch via #14. The GitHub workflow was misconfigured to deploy the GitHub pages gallery site from any commit, including on a pull request branch. I'm attempting to reconfigure it to only deploy the gallery from commits to main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants