Invariant Violation: Tried to register two views with the same name
@atlj ci sta già lavorando.
Dal 17/3/2023.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Description
Steps to reproduce:
- Create a new "Native view" project via
npx create-react-native-library@latest test - cd example && yarn start
- run android app
- perform any modification to the
src/index.tsxwhere the custom view bridge is defined, for example add a simple newline at the end of the file
Actual:
The error:
Invariant Violation: Tried to register two views with the same name TestView, js engine: hermes
is displayed in the console and in the Android app.
The error points to the requireNativeComponent line of the following code in src/index.tsx:
export const TestView =
UIManager.getViewManagerConfig(ComponentName) != null
? requireNativeComponent<TestProps>(ComponentName)
: () => {
throw new Error(LINKING_ERROR);
};
Expected:
no errors should be shown.
Packages
- create-react-native-library
- react-native-builder-bob
Selected options
✔ What is the name of the npm package? … react-native-test
✔ What is the description for the package? … xxx
✔ What is the name of package author? … Alessio Bianchi
✔ What is the email address for the package author? …
✔ What is the URL for the package author? …
✔ What is the URL for the repository? …
✔ What type of library do you want to develop? › Native view
✔ Which languages do you want to use? › Kotlin & Swift
✔ Project created successfully at test!
Link to repro
No response
Environment
System:
OS: macOS 13.2.1
CPU: (8) arm64 Apple M2
Memory: 102.70 MB / 24.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.7.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.5.0 - /opt/homebrew/bin/npm
Watchman: 2023.03.06.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.0 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.18 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
- Lingua principale
- JavaScript
- Stelle
- 3.2k
- Fork
- 227
- Merge medio
- 2g 23h
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di callstack/react-native-builder-bob
-
Doesn't work with NPMApertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
callstack/react-native-builder-bob#901 · 1 commento ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
callstack/react-native-builder-bob#896 · 2 commenti ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
callstack/react-native-builder-bob#852 · 1 commento · 1 reazione ·
Tutte le issue di callstack/react-native-builder-bob
Issue simili
-
external-issue to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
LearningCircuit/local-deep-research#7067 ·
I maintainer di solito rispondono entro 1 giorno
-
automated issue report
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
lirantal/discoprint#32 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno