ERROR Error: Reanimated 2 failed to create a worklet
先试一下清空缓存命令
- yarn
yarn start --reset-cache
- npx
npx react-native start --reset-cache
Unknown option: .plugin. Check out babeljs.io/docs/en/bab… for more information about options.
修改修改配置文件babel.config.js并增加
plugins: ['react-native-reanimated/plugin'],
请注意Windows需要带引号
"plugin":['react-native-reanimated/plugin'],
显示为:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
"plugins": ['react-native-reanimated/plugin'],
};
Mac电脑可以直接写成
plugins: ['react-native-reanimated/plugin'],
显示为:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
作者:Blue_Color
链接:www.jianshu.com/p/90c665746…
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。