Giter Club home page Giter Club logo

Comments (6)

kristerkari avatar kristerkari commented on June 21, 2024 2

Looks like there is a fix for it: gregberge/svgr#894

from react-native-svg-transformer.

pehagg avatar pehagg commented on June 21, 2024 1

@thibaultcapelli , sorry, I missed the "when I upgrade" part. For context, have you upgraded any other libs in your project or is it this lib only?

from react-native-svg-transformer.

kristerkari avatar kristerkari commented on June 21, 2024 1

Looks like this is a possible bug in SVGR:
gregberge/svgr#891

from react-native-svg-transformer.

pehagg avatar pehagg commented on June 21, 2024

I would encourage you to read the error message and your code again.

You can't import the same declarations twice, the typescript compiler will choke on this. Just use regular imports. Type imports are for more esoteric cases when you run into issues with transpilers. For a detailed description, see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export.

from react-native-svg-transformer.

thibaultcapelli avatar thibaultcapelli commented on June 21, 2024

Hello @pehagg

I understand the error but the code is not mine. It provide from an SVG I import with this lib. I guess it is the transpiled code. I do not have this issue with the 1.0.0

from react-native-svg-transformer.

kristerkari avatar kristerkari commented on June 21, 2024

If you run into this problem, please check that your lockfile is using the 8.1.0 or newer version for the following react-native-svg-transformer dependencies:

@svgr/core
@svgr/plugin-jsx 
@svgr/plugin-svgo

from react-native-svg-transformer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.