React Native Error: Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?

 리액트 네이티브 드로어 내비게이터를 사용중 아래와 같은 에러가 발생했습니다. 드로어 내비게이터가 의존적인 react-native-reanimated 관련 발생한 에러네요.

Error: Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?

Invariant Violation:


Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.

This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

babel.config.js 파일이 처음에 아래와 같이 되어 있는데 plugins 부분을 추가해줍니다.

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
};

아래와 같이 추가 후 npm start -- --reset-cache 를 실행해 번들링을 다시 해주면 잘 되네요. 혹시 plugins 부분이 아래와 같이 단순하지 않으신 분들은 위 링크를 참고해서 배열의 제일 마지막 부분에 내용을 추가해주면 됩니다.

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};

댓글

이 블로그의 인기 게시물

'xxx.exe' 프로그램을 시작할 수 없습니다. 지정된 파일을 찾을 수 없습니다.

goorm IDE에서 node.js 프로젝트로 Hello World Simple Server 만들어 띄워보기

애드센스 수익을 웨스턴 유니온으로 수표대신 현금으로 지급 받아보자.