Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build - Module '"svgo"' has no exported member 'OptimizeOptions' #68

Open
JunlinPan-Crypto opened this issue Dec 21, 2022 · 4 comments

Comments

@JunlinPan-Crypto
Copy link

JunlinPan-Crypto commented Dec 21, 2022

Failed to build React TS (pnpm) project with following error:

> tsc && vite build --mode dev

node_modules/.pnpm/@svgr+core@6.5.1/node_modules/@svgr/core/dist/index.d.ts:2:10 - error TS2305: 
Module '"svgo"' has no exported member 'OptimizeOptions'.

import { OptimizeOptions } from 'svgo';

Packages:

"vite-plugin-svgr": "^2.4.0"
"@types/svgo": "^3.0.0"

vite.config.ts

import svgr from 'vite-plugin-svgr'

plugins: [react(), svgr(), basicSsl()]
@JunlinPan-Crypto
Copy link
Author

gregberge/svgr#811

@JunlinPan-Crypto
Copy link
Author

JunlinPan-Crypto commented Dec 21, 2022

Downgrading the version of @types/svgo works:

"@types/svgo": "2.6.4"

@panjiangyi
Copy link

see here 44

@1EDExg0ffyXfTEqdIUAYNZGnCeajIxMWd2vaQeP

This is fixed with svgo 7, which uses svgr 3 (see here). Can we get an update that pulls in the newest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants