react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Warning after importing react-native-paper : Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.

Open Steffi3rd opened this issue 7 years ago • 21 comments

Capture d’écran 2019-03-16 à 12 16 32

Steffi3rd avatar Mar 16 '19 11:03 Steffi3rd

add module:react-native-paper/babel to your babel.config.js.

My babel.config.js:

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    ["module:react-native-dotenv"],
    ["module:babel-plugin-module-resolver", {
      "alias": {
        "src": "./src"
      }
    }],
    ["module:react-native-paper/babel"]
  ]
};

Don't forget clear cache before rebuilding:

rm -rf /tmp/metro-*
npm start --reset-cache

deviant310 avatar Jan 18 '21 14:01 deviant310