• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    미해결

ReferenceError: Property 'WeakRef' doesn't exist, js engine: hermes 에러 문제

23.12.08 21:03 작성 조회수 279

1

npm run android 명령어 통해서 실행 할때 2가지 에러가 발생합니다.

 

ERROR ReferenceError: Property 'WeakRef' doesn't exist, js engine: hermes

LOG Running "FoodDeliveryApp" with {"rootTag":11}

ERROR Invariant Violation: "FoodDeliveryApp" 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

구글링 했을 때 나오는 자료가 거의 없고 gpt로 찾아본 방법들로 버전 확인하거나 업데이트 시키는 명령어도 잘 실행되지 않고

hermesEnabled=false 로 설정하고 실행도 해봤는데 hermes 부분만 사라지고 에러가 똑같이 발생합니다.


답변 2

·

답변을 작성해보세요.

0

AppRegistry.registerComponent(appName, () => App);

여기서 appName이 FoodDeliveryApp이 맞나요?

일단 제가 했을 때는 잘 됩니다. 버전 문제일 수도 있으니 rn72 폴더의 package.json 버전도 보셔야 할 것 같습니다.

https://github.com/ZeroCho/food-delivery-app/tree/master/rn72

김민우님의 프로필

김민우

질문자

2023.12.10

앗 구글링 다시 해봤더니 최근에 깃헙에 올라온걸 보니 @reduxjs/toolkit 2.0 버전인가 문제가 있고 2.0.1 버전 핫픽스 배포했다해서 다시 설치했더니 잘 실행 됩니다

0

어디까지 했을 때 에러가 발생하시나요? RN 몇 버전이신가요??

김민우님의 프로필

김민우

질문자

2023.12.09

ch4 에 있는 코드들 전부 넣고 터미널에서 npm run android 실행했을 때 바로 이렇게 뜹니다.

 

0.72.7 버전 입니다.

 


image

npm react-native info 실행한 값입니다.

System:

OS: Windows 11 10.0.22621

CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz

Memory: 1.41 GB / 15.80 GB

Binaries:

Node:

version: 20.10.0

path: D:\Program Files\nodejs\node.EXE

Yarn:

version: 1.22.19

path: ~\AppData\Roaming\npm\yarn.CMD

npm:

version: 10.2.1

path: D:\Program Files\nodejs\npm.CMD

Watchman: Not Found

SDKs:

Android SDK: Not Found

Windows SDK: Not Found

IDEs:

Android Studio: Not Found

Visual Studio:

- 17.5.33424.131 (Visual Studio Community 2022)

Languages:

Java: 19.0.2

Ruby: Not Found

npmPackages:

"@react-native-community/cli": Not Found

react:

installed: 18.2.0

wanted: 18.2.0

react-native:

installed: 0.72.7

wanted: 0.72.7

react-native-windows: Not Found

npmGlobalPackages:

"*react-native*": Not Found

Android:

hermesEnabled: true

newArchEnabled: false

iOS:

hermesEnabled: Not found

newArchEnabled: Not found