Ionicons not found

I am not able to add ionicons like person-sharp etc. it is coming 404 not found . I can just use person keywword.

You can also use icons other than ionic icons:

For example:

<ion-icon src="../../assets/svg/your-icon-name.svg"></ion-icon>

if you are not on the latest ionic version 5 then i would suggest download the svg and use it as @erkinalan suggested

both should not be the solution. What ionic Version do you use?

Well there is no issue you can use …

i am using version - 5.4.2

do you have a specific Ionicons Version installed?

No i am not having any specific version installed.

so when you open your node_modules, go to ionicons --> package.json, what Version is displayed there?


just this

Wrong package.json. Two file under this. And then just check the “version” Tag.

version is 4.6.3 in package.json

Yeah that is the wrong Version. Ionic Icons changed from v4 to v5 a lot. Please conform you don’t have ionicons in your projects package.json

how to update it now should i replace the new version with the older one?
and thanks a lot for ur help :slight_smile:

Hi @Simran3798,

there are two ways to update your ionicicons :slight_smile:

  1. npm i ionicons
  2. put this script:
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>

inside the index.html file.

1 Like

Please don’t put the script Tag! After you update in your package.json, remove the node_modules and the package-lock.json and run npm install. By the way you don’t need the reference in your package.json as it cones with the Ionic Package defaulty