Fix: Error using astro-compress with astro-icon: Unknown builtin plugin "cleanupIDs" specified
yacosta738 opened this issue · comments
There is an error when using "astro-compress" in versions higher than "1.1.23". This error occurs along with another Astro component called "astro-icon". Apparently, it removes "cleanupIDs" where the specified icon to be used is indicated.
The error only occurs when building in development mode; everything works correctly otherwise.
▶ src/pages/index.astro
i18next: languageChanged en
error [astro-icon] Unable to load icon "mdi:rss"!
Error: Unknown builtin plugin "cleanupIDs" specified.
Error: [astro-icon] Unable to load icon "mdi:rss"!
Error: Unknown builtin plugin "cleanupIDs" specified.
at file:///home/runner/work/yacosta738.github.io/yacosta738.github.io/dist/chunks/pages/all.ca28674c.mjs:621:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async AstroComponentInstance.render (file:///home/runner/work/yacosta738.github.io/yacosta738.github.io/dist/chunks/astro.efe1843c.mjs:1586:7)
at async renderChild (file:///home/runner/work/yacosta738.github.io/yacosta738.github.io/dist/chunks/astro.efe1843c.mjs:1643:5)
at async [Symbol.asyncIterator] (file:///home/runner/work/yacosta738.github.io/yacosta738.github.io/dist/chunks/astro.efe1843c.mjs:1310:7)
at async renderAstroTemplateResult (file:///home/runner/work/yacosta738.github.io/yacosta738.github.io/dist/chunks/astro.efe1843c.mjs:1318:20)
at async renderChild (file:///home/runner/work/yacosta738.github.io/yacosta738.github.io/dist/chunks/astro.efe1843c.mjs:1641:5)
at async AstroComponentInstance.render (file:///home/runner/work/yacosta738.github.io/yacosta738.github.io/dist/chunks/astro.efe1843c.mjs:1595:7)
at async renderChild (file:///home/runner/work/yacosta738.github.io/yacosta738.github.io/dist/chunks/astro.efe1843c.mjs:1643:5)
at async [Symbol.asyncIterator] (file:///home/runner/work/yacosta738.github.io/yacosta738.github.io/dist/chunks/astro.efe1843c.mjs:1310:7)
ELIFECYCLE Command failed with exit code 1.
Error: Process completed with exit code 1.
Any updates on this?
The problem still persists and I don't know if it will have a short-term solution. The only solution I have found is not to update the version. I stayed on version 1.1.23, which works with astro-icon.
Hi @NikolaRHristov this is one open PR from renovate yacosta738/yacosta738.github.io#735
In this case, the astro-compress tool deletes the cleanupIDs when the build is executed.
Hi, as a temporary fix I've created a custom branch with svgo
2.8.0 that's currently working - https://github.com/astro-community/astro-compress/tree/svgo-2.8.0 You can install it like this:
"astro-compress": "astro-community/astro-compress#svgo-2.8.0",
I'll try to fix it in astro-icon
and see if I can open a PR in there.
There's already a PR natemoo-re/astro-icon#76, I'm closing this issue in favor of it, you can still use the astro-compress
svgo
2.8.0
branch respectively https://github.com/astro-community/astro-compress/tree/svgo-2.8.0. I'll try to keep it updated as possible.
Don't need to reopen this, just wanted to update the next person who comes along:
That PR linked did not get anywhere or at the very least it did not solve this. The solution is to use the new astro-icon branch. To do so you'll want to manually install/upgrade the package to astro-icon@next
. Then go to the v1
branch on the astro-icon repo and follow the README.