0

i am using React-Native using Expo-cli. I've also installed a library React-Native-Paper. When i run (expo start) my code without importing React-Native-Paper component it runs fine, but as i import even a single component from React-Native-Paper (lets say PaperProvider) i get the following error..
enter image description here

module.exports = function (api) {
    api.cache(true);
    return {
        presets: ['babel-preset-expo'],
        env: {
            production: {
                plugins: ['react-native-paper/babel.js'],
            },
        },
    };
};

Please help.!

Rahul Gupta
  • 88
  • 10
  • Remove the keyword type and import like import {Fonts} from '../types'. Also if you want to export type you can do export type Fonts = { //Some Code }. – Rohit Aggarwal Mar 19 '21 at 14:53
  • The type error is from the react-native-paper library's file in node modules. I think my babel is not converting typeScript code of library to js, thats why this error is arising. – Rahul Gupta Mar 19 '21 at 14:58

0 Answers0