관리 메뉴

사과하는 제라스

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

React Native 공부

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

Xerath(제라스) 2022. 6. 30. 10:35

목차

    728x90
    반응형
     ERROR  Error: Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?
     ERROR  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.

    라는 Error가 떴었다. babel plugin문제라고 느꼈고 검색해본 결과 babel.config.js에 plugins: ['react-native-reanimated/plugin'],가 빠져있던 것이었다.

     

    Solution

     

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

     

    출처: https://javascript.plainenglish.io/error-reanimated-2-failed-to-create-a-worklet-maybe-you-forgot-to-add-reanimateds-babel-plugin-525c6003024c

     

    Error: Reanimated 2 failed to create a worklet — Maybe You Forgot to Add Reanimated’s babel Plugin?

    The solution…

    javascript.plainenglish.io

     

    728x90
    반응형