Git Product home page Git Product logo

Comments (6)

andreialecu avatar andreialecu commented on June 1, 2024 2

Ran into the same issue.

The problem here is that this package defined react-native-fast-image as a dependency but it should be in peerDependencies instead.

Ref:

"dependencies": {
"react-native-fast-image": "8.3.4"
}

The technical reason this happens is because yarn may install react-native-fast-image twice on two separate versions.

➜ yarn why react-native-fast-image        
├─ x@workspace:.
│  └─ react-native-fast-image@npm:8.3.7 [ceb3f] (via npm:^8.3.2 [ceb3f])
│
├─ react-native-image-modal@npm:2.0.3
│  └─ react-native-fast-image@npm:8.3.4 (via npm:8.3.4)
│
└─ react-native-image-modal@npm:2.0.3 [ceb3f]
   └─ react-native-fast-image@npm:8.3.4 [74cfa] (via npm:8.3.4 [74cfa])

Notice how both 8.3.7 and 8.3.4 are installed.

The correct way to fix this would be to make it a peer dependency however. The installation guide mentions it needs to be installed in the parent project anyways: https://github.com/dev-yakuza/react-native-image-modal#installation

I'll open a PR shortly with a fix.

from react-native-image-modal.

yudhaaw96 avatar yudhaaw96 commented on June 1, 2024 1

downgrading to version 1.0.16 works for me, no more "Invariant Violation: Tried to register two views with the same name FastImageView"

from react-native-image-modal.

dev-yakuza avatar dev-yakuza commented on June 1, 2024

@yudhaaw96

Thanks for reporting.
However, I can't investigate this issue. So, could you give me more details? (e.g. sample code, details about the situation, how to make the same error)

Thanks.

from react-native-image-modal.

dbotman avatar dbotman commented on June 1, 2024

I get the same error:

ERROR Invariant Violation: Tried to register two views with the same name FastImageView

Does anyone have a solution yet?

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

It seems to happen after the upgrade from Expo 39 to Expo 40

from react-native-image-modal.

dev-yakuza avatar dev-yakuza commented on June 1, 2024

@dbotman

This library does not support Expo anymore. Because this library uses react-native-fast-image.

Please check the README.

Screen Shot 2021-08-30 at 21 39 50

from react-native-image-modal.

naheed-shamim avatar naheed-shamim commented on June 1, 2024

Try installing [email protected]

from react-native-image-modal.

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.