question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After v0.2.0 upgrade: Invariant Violation => Rename RNCMaskedView to RNMaskedView

See original GitHub issue

This issue prevents me from using react-native-masked-view v0.2.0 because I can’t run this and v0.1.10 in parallel, while the latter is a peer dependency for @react-navigation/stack ("@react-native-community/masked-view": ">= 0.1.0" that is). Installing both yields the following error which makes sense:

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

This could be avoided by renaming RNCMaskedView to RNMaskedView, which makes more sense anyway, since the RNC stood for @react-native-community and this is not under the RNC umbrella anymore.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:10

github_iconTop GitHub Comments

1reaction
TheWirvcommented, Dec 16, 2020

What is in v0.2.0 that you cannot find in v0.1.10?

@JimTeva I honestly don’t know how that would make any difference. It is a matter of principle. I would just like to work with the most uptodate versions of my packages, and this is preventing me from that.

To actually answer your question, Xcode 12 compatibility would definitely be nice. But you don’t know if this package will get a major update with some cool new feature in the near future, do you? And in that case, it would be impossible for any React Navigation integrator to use that new feature. Bummer.

0reactions
steven-taglohnercommented, Aug 16, 2021

This is a pain because we have two different deps that rely on this package under it’s different namespace. One references @react-native-community/masked-view The other references @react-native-masked-view/masked-view So we get Tried to register two views with the same name RNCMaskedView Removing either of them results in metro complaining that it’s not available to be imported into the dependency. Eg.

Error: Unable to resolve module `@react-native-masked-view/masked-view` from `node_modules/react-native-skeleton-placeholder

The only way I could find to deal with it was with babel-module-resolver

//...
alias: {
  "@react-native-community/masked-view": "@react-native-masked-view/masked-view",
}

Could you elaborate more? where to put this alias? Thanks!

https://www.npmjs.com/package/babel-plugin-module-resolver

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - After v0.2.0 upgrade: Invariant Violation => Rename ...
After v0.2.0 upgrade : Invariant Violation => Rename RNCMaskedView to ... This issue prevents me from using react-native-masked-view v0.2.0 because I can't ...
Read more >
Invariant Violation: Tried to register two views with the same ...
I ran into this problem when I upgraded my project using npm-check-updates. That is obviously not the correct way of doing it for...
Read more >
Invariant Violation: The navigation prop is missing for this ...
Build error after upgrading to React Navigation 3. ... In v2 and earlier, the containers in React Navigation are automatically provided by ...
Read more >
masked-view - githubmemory
After v0.2.0 upgrade: Invariant Violation => Rename RNCMaskedView to RNMaskedView. costerik. costerik OPEN · Updated 1 year ago ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found