Could not find one or more icon(s) Warning with vuejs application

I am unable to fix the warning
“Could not find one or more icon(s) {prefix: “far”, iconName: “square”} {}” (screenshot attached)
The warning pops when I change the value of the ‘typeOfAreaClass’ or select ‘safe area’ from the “areaClass”

enter image description here

Here is the screenshot of the menu of v-select with the 'square ’ icon if that helps you give a suggestion.
enter image description here

I tried installing the font awesome library. It didn’t help. One thing I figured out is that the warning occurs when I add the prop “multiple” to the v-select component. If I remove that prop, there is no warning. But it kills the purpose. Does this this help you give a suggestion? My font awesome ions are working fine. Only the v-select prop ‘multiple’ is creating the warning.

Here is the HTML code

  <v-flex xs12 md4 sm4  >
    <v-select
    class="myfont1 mt-3 pa-0 customDecoration text-xs-right" 
    @change="assignHazGroups"
    :items="typeOfAreaClassItems"
    v-model="typeOfAreaClassSelect"
    style="max-width:170px;"
    dense
    ></v-select> 
  </v-flex>

  <v-flex xs12 md4 sm4  >
    <v-select
    class="myfont1 mt-3 pa-0 mx-0 customDecoration" 
    @change="safeAreaFilter"
    :items="typeOfAreaClassSelect ==='American' ?areaClassAmericanItems:areaClassEuropeanItems"
    v-model="areaClassSelect"
    style="max-width:220px;"
    dense
    ></v-select> 
  </v-flex>

  <v-flex xs12 md4 sm4 class="ma-0 pa-0"
  >
    <v-select
    class="myfont1 mt-3 pa-0 mx-0 customDecoration"
    :items="typeOfAreaClassSelect =='American' ?hazGroupAmericanItems:hazGroupEuropeanItems"
    v-model="hazGroupSelect"
    multiple
    small-chips
    style="max-width:350px;"
    dense
    ></v-select>    

  </v-flex>

Here are the array variables

typeOfAreaClassItems:["American","European"],
            areaClassAmericanItems:[
                "Safe Area",
                "Class I, Div 1/Class I, Div 2",
                "Class I, Div 1",
                "Class I, Div 2",
            ],
            areaClassEuropeanItems:[
                "Safe Area",
                "Zone-1/Zone-2",
                "Zone-1",
                "Zone-2"
            ],
            hazGroupAmericanItems:[
                "Group A",
                "Group B",
                "Group C",
                "Group D",
                "NA"
            ],
            hazGroupEuropeanItems:[
                "IIC",
                "IIB+H2",
                "IIB",
                "IIA",
                "NA"
            ],
            eleCertItems:[
                "CSA",
                "UL",
                "ATEX",
                "FM",
                "PESO",
                "JIS (Japan)",
                "GOST (Russia)"
            ],
            
            
  //computed variables          
            typeOfAreaClassSelect:{
                get () {
                    return this.$store.getters.typeOfAreaClassSelect
                },
                set (value) {
                    this.$store.dispatch('setTypeOfAreaClassSelect',{data:value})
                }
            },
            areaClassSelect:{
                get () {
                    return this.$store.getters.areaClassSelect
                },
                set (value) {
                    this.$store.dispatch('setAreaClassSelect',{data:value})
                }
            },
            hazGroupSelect:{
                get () {
                    return this.$store.getters.hazGroupSelect
                },
                set (value) {
                    this.$store.dispatch('setHazGroupSelect',{data:value})
                }
            },
            eleCertSelect:{
                get () {
                    return this.$store.getters.eleCertSelect
                },
                set (value) {
                    this.$store.dispatch('setEleCertSelect',{data:value})
                }
            },

And here are the functions

assignHazGroups(){
    if(this.typeOfAreaClassSelect === "American"){
        this.areaClassSelect = "Class I, Div 2"
        this.hazGroupSelect = [
            "Group A",
            "Group B"
        ]
    }
    else{
        this.areaClassSelect = "Zone-2"
        this.hazGroupSelect = [
            "IIB",
            "IIA"
        ]
    }
},
safeAreaFilter(){
    if(this.areaClassSelect === "Safe Area"){
        this.hazGroupSelect = ["NA"]
    }
    else{
        if(this.typeOfAreaClassSelect === "American"){
            this.hazGroupSelect = [
                "Group A",
                "Group B"
            ]
        }
        else{
            this.hazGroupSelect = [
                "IIB",
                "IIA"
            ]
        }
    }
},

It appears when I invoke the @change event and call a function. Need to get rid of this warning. The code is all running fine. But there is this warning that is annoying. Anyone, please suggest a way out. Thanks in advance

Hi

vuetify uses some icons. Here it tells you how to include them https://vuetifyjs.com/en/customization/icons#install-material-design-icons maybe this will solve your problem

Thanks for the suggestion. I tried installing the font awesome library. It didn’t help.
One thing I figured out is that the warning occurs when I add the prop “multiple” to the v-select component. If I remove that prop, there is no warning. But it kills the purpose. Does this this help anyone give a suggestion? thanks. The warning pops up when I deselect an item from the menu

1 Like

I fixed it myself

Here is what I did. I changed the iconfont in the vuetify plugin js file.

in the /plugins/vuetify.js file

changed the following code

Vue.use(Vuetify, {
  iconfont: 'faSvg',
})

to this

Vue.use(Vuetify, {
  iconfont: 'md',
})

That essentially fixed the icon warning. It’s so silly that we sometimes spend hours to fix a simple issue.
I posted this so that someone may find it useful. Anyways, thank you everyone for your time. Happy coding!

1 Like