Eyasu Emana
Eyasu Emana

Reputation: 45

Error is saying You may need an additional loader to handle the result of these loaders

I meet with the following error on my terminal whenever I try to use native-base in react-native

./node_modules/react-native-reanimated/lib/index.web.js 5:9 Module parse failed: Unexpected token (5:9) File was processed with these loaders:

export * as default from "./Animated";

=>Here is my babe.config.js

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      'react-native-reanimated/plugin',
      "nativewind/babel",
    ],
  };
};

=>Here is my package.json

{
  "name": "equb",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start --android",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-navigation/drawer": "^6.5.4",
    "@react-navigation/native": "^6.1.1",
    "expo": "~47.0.8",
    "expo-linear-gradient": "~12.0.1",
    "expo-status-bar": "~1.4.2",
    "native-base": "^3.4.25",
    "nativewind": "^2.0.11",
    "react": "18.1.0",
    "react-dom": "^18.2.0",
    "react-native": "0.70.5",
    "react-native-gesture-handler": "^2.8.0",
    "react-native-reanimated": "^2.13.0",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-svg": "^12.1.1",
    "react-native-vector-icons": "^9.2.0",
    "react-native-web": "^0.17.1",
    "tailwindcss": "^3.2.4"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

I've installed native-base and enclose all my project in as follows

export default function App() {
  return (
    <NativeBaseProvider>
      <NavigationContainer>
        <RootStack />
      </NavigationContainer>
    </NativeBaseProvider>
  );
}

But error is still occuring

Upvotes: 1

Views: 558

Answers (1)

Patel Himanshu
Patel Himanshu

Reputation: 31

Force Install

You can also force the installation, but this might lead to broken dependencies.

npm install react-native-animated-loader --force

Upvotes: 1

Related Questions