Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] "Error: Tried to Register Two Views with the Same Name (RNCMaskedView) and 'main' Not Registered" #20

Open
cavewebs opened this issue Oct 1, 2023 · 7 comments

Comments

@cavewebs
Copy link

cavewebs commented Oct 1, 2023

Version

1.1.1

Reproduction link

https://github.com/timchosen/soft-ui-pro.git

Operating System

MacBook Pro running MacOS Monterey V 12.6.6

Device

iPhone 13 PRO running Expo Go v2.29.6

Browser & Version

Google Chrome Version 117.0.5938.92 (Official Build) (x86_64)

Steps to reproduce

step 1: Download and extract the app
step 2: cd into the extracted app and run npm install
step 3: run npm run start
step 4: scan the generated QR code to load the app in Expo (iOS)
step 5: app should load and fail at the splash screen with the error
ERROR Invariant Violation: Tried to register two views with the same name RNCMaskedView, js engine: hermes
ERROR Invariant Violation: "main" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes

What is expected?

To successfully load the demo app using expo

What is actually happening?

After runing npm run start, I get a QR code to scan, I scan successfully, loads the app and splash screen but fails with the errors

ERROR Invariant Violation: Tried to register two views with the same name RNCMaskedView, js engine: hermes
ERROR Invariant Violation: "main" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes

Solution

Additional comments

@RonneiPeterson
Copy link

Same error here

@cavewebs
Copy link
Author

Same error here

Not sure how I fixed it, but I think I moved over to yarn

@RonneiPeterson
Copy link

tnks

@mitchboulay
Copy link

Solution of yarn over npm worked for me as well.

@JOY-SAM
Copy link

JOY-SAM commented Apr 8, 2024

I have no idea about yarn, but I did

cd project_dir
yarn install
yarn expo start

I got error

node:internal/errors:478
ErrorCaptureStackTrace(err);
^

Error [ERR_LOADER_CHAIN_INCOMPLETE]: "file:///Users/joy/Downloads/HS/.pnp.loader.mjs 'resolve'" did not call the next hook in its chain and did not explicitly signal a short circuit. If this is intentional, include shortCircuit: true in the hook's return.
at new NodeError (node:internal/errors:387:5)
at ESMLoader.resolve (node:internal/modules/esm/loader:849:13)
at async ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:7)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12) {
code: 'ERR_LOADER_CHAIN_INCOMPLETE'
}

And please, don't make things complicated, please fix the issue with npm. We buy template reduce stress.
Making us fixing bugs stress out again.

@JOY-SAM
Copy link

JOY-SAM commented Apr 9, 2024

Try, it works.

npm install --legacy-peer-deps

Don't npx expo-doctor later or update packages

@elieserme
Copy link

Same error here.This product does not receive any attention from Creative-Tim. Has creative-tim gone bankrupt? Terrible product and service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants