Open felixranesberger opened 1 year ago
Hello, I have a similar problem. Has anyone resolved the problem? Thanks in advance.
You could try using overrides
to update svgo
internally yourself.
Could look something like this:
"overrides": {
"vite-plugin-svg-icons": {
"svgo": "~3.0.0"
}
}
Haven't tried or tested it though. If this works for you, it would be awesome if you could give me some feedback with your current implementation of the fix, because I'm also facing the issue currently :)
Thank you 🙏 for your suggestion! But unfortunately 😞 that doesn't seem to work either.
Code package.json
{
"name": "vite-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"vite": "^5.2.10"
},
"dependencies": {
"vite-plugin-svg-icons": "^2.0.1"
},
"overrides": {
"vite-plugin-svg-icons": {
"svgo": "~3.0.0"
}
}
}
obtained result
This could work:
"overrides": {
"svg-baker": {
"micromatch": "^4.0.0"
}
}
(svgo wasn't the problem but a sub-sub-dependency of svg-baker)
Well done ! Indeed ! 👍 But there is still the stable@0.1.8 library which is causing problems now.🤔
package.json
{
"name": "vite-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"vite": "^5.2.10"
},
"dependencies": {
"vite-plugin-svg-icons": "^2.0.1"
},
"overrides": {
"svg-baker": {
"micromatch": "^4.0.0"
}
}
}
Screenshot
This should fix it
"overrides": {
"svg-baker": {
"micromatch": "^4.0.0"
},
"vite-plugin-svg-icons": {
"svgo": "^3.2.0"
}
}
It's still the same error, I don't know why.
package.json
{
"name": "vite-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"vite": "^5.2.10"
},
"dependencies": {
"vite-plugin-svg-icons": "^2.0.1"
},
"overrides": {
"svg-baker": {
"micromatch": "^4.0.0"
},
"vite-plugin-svg-icons": {
"svgo": "^3.2.0"
}
}
}
Screenshot
Weird, did you try removing the node_modules
and running npm install
again?
I tried it on my project and I don't get the warning.
Haven't tried if it works yet though.
Could you resolve your error?
On installation of this package, a warning occurs. This should be fixable by updating SVGO to a newer version, since the deprecated dependency
stable
seems updated to a newer version in SVGO v3.