vite-plugin-solid-svg icon indicating copy to clipboard operation
vite-plugin-solid-svg copied to clipboard

Typescript error: Duplicate identifier 'src'

Open SerenaLynas opened this issue 2 years ago • 1 comments

When compiling with TypeScript, I get the following error:

node_modules/vite-plugin-solid-svg/types-component-solid.d.ts:4:18 - error TS2300: Duplicate identifier 'src'.

4   export default c
                   ~

  node_modules/vite/client.d.ts:135:18
    135   export default src
                         ~~~
    'src' was also declared here.

node_modules/vite/client.d.ts:135:18 - error TS2300: Duplicate identifier 'src'.

135   export default src
                     ~~~

  node_modules/vite-plugin-solid-svg/types-component-solid.d.ts:4:18
    4   export default c
                       ~
    'src' was also declared here.

I believe this is because of the fact that this plugin replaces the built-in vite svg import.

SerenaLynas avatar Oct 20 '23 21:10 SerenaLynas

Can you try with skipLibCheck: true in tsconfig?

MrFoxPro avatar Oct 21 '23 04:10 MrFoxPro