Giter Club home page Giter Club logo

Comments (6)

rodrigodiasf1984 avatar rodrigodiasf1984 commented on July 22, 2024

i've opened an new question on the stackOverflow as well:
https://stackoverflow.com/questions/78458785/react-native-v0-74-1-unable-to-resolve-module-when-importing-svg

from react-native-svg-transformer.

kristerkari avatar kristerkari commented on July 22, 2024

I just updated the demo app (https://github.com/kristerkari/react-native-svg-example) to 0.74.1, and it is working.

I'm not sure about your problem, but a very common problem with configuring this library is that people don't restart the Metro packager after changing the Metro config.

from react-native-svg-transformer.

baryon avatar baryon commented on July 22, 2024

same issue, but I found there is not the svg file really. fixed path and soloved

from react-native-svg-transformer.

rodrigodiasf1984 avatar rodrigodiasf1984 commented on July 22, 2024

I just updated the demo app (https://github.com/kristerkari/react-native-svg-example) to 0.74.1, and it is working.

I'm not sure about your problem, but a very common problem with configuring this library is that people don't restart the Metro packager after changing the Metro config.

Thanks for your help I've used to close the metro after installing a library when I got an error and also yarn --reset-cache. I've looked at your example and I noticed something different, by default the new version of react-native adds this to the extends at the tsconfig.json(by the away your example uses webpack and I couldn't compare the tsconfig.json)

"extends": "@react-native/typescript-config/tsconfig.json",

So I was digging into my other projects and I replaced this extends with the old extends in previous versions of react-native, and the error is gone and I'm able to import the SVG file write now. I'm not sure if this is the best solution.

image

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.