Open kaiyoma opened 1 year ago
@TrySound any idea?
Just ran into this, too.
Looks like svgo
isn't listed in the dependencies at all, and this may only work locally because you've included @types/svgo
in your devDependencies
.
https://github.com/gregberge/svgr/blob/main/packages/core/package.json#L48
To ship the type you could duplicate the definition, or just change it to be a normal dependency
(I don't know anything about these packages so apologies if this is unrelated)
I think the latest version (8.0.0) fixes all the annoying TypeScript issues I've had with this package. If you upgrade to the latest versions of @svgr/core
and svgo
all the type issues seem to resolve themselves.
I think svgo should be a normal dependency (not dev). That should also fix #904
🐛 Bug Report
When using this library and running the type checker, I get this error:
I've tried forcing versions 2.8.0 and 3.0.2 of
svgo
and I get the same error in both cases. It seems that possibly@types/svgo
has thisOptimizeOptions
type, but that package is deprecated now: https://www.npmjs.com/package/@types/svgoRun
npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard
Paste the results here: