Part of series: Error
Unable to load icon by astro-icon
/ 0.57 minutes
Last updated:
My Astro project complains that it cannot find the icon chart when building. I am using the astro-icon library.
15:18:57 ββ /blog/my-post/index.html[astro-icon] Unable to load icon "carbon:tag-group"!
Error: Unknown builtin plugin "cleanupIDs" specified.
Stack trace:
at file:///.../dist/chunks/index_CkwRwbc7.mjs:254:13
error: script "build" exited with code 1
When using an icon, you need to add its module to the project dependency package.json
. You can use the installation command.
bun add -d @iconify-json/carbon
Or you can directly download the svg file and put it in the project directory src/icons
. You can download the icon from iconify.
astro-icon
is quite convenient to use. It can automatically import icons under the mdi
module by default, and other modules need to be explicitly declared.
Links: