When I'm trying to run react-native run-android I'm getting this error.
App.js code
import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View} from 'react-native'; import { createStackNavigation } from 'react-navigation'; import Splash from './components/splash/splash'; import Login from './components/login/login';
const App = createStackNavigation({ Login: {screen: Login}, Spash: {screen: Splash} },{ initialRouteName: "Splash", headerMode: "none", });
export default App
Unable to resolve module ./components/splash/splash
from /home/subrata/puplr_mobile_app/puplr/App.js
: The module ./components/splash/splash
could not be found from /home/subrata/puplr_mobile_app/puplr/App.js
. Indeed, none of these files exist:
* /home/subrata/puplr_mobile_app/puplr/components/splash/splash(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
* /home/subrata/puplr_mobile_app/puplr/components/splash/splash/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
Error: Unable to resolve module ./components/splash/splash
from /home/subrata/puplr_mobile_app/puplr/App.js
: The module ./components/splash/splash
could not be found from /home/subrata/puplr_mobile_app/puplr/App.js
. Indeed, none of these files exist:
* /home/subrata/puplr_mobile_app/puplr/components/splash/splash(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
* /home/subrata/puplr_mobile_app/puplr/components/splash/splash/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
at ModuleResolver.resolveDependency (/home/subrata/puplr_mobile_app/puplr/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:120:15)
at ResolutionRequest.resolveDependency (/home/subrata/puplr_mobile_app/puplr/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:49:18)
at DependencyGraph.resolveDependency (/home/subrata/puplr_mobile_app/puplr/node_modules/metro/src/node-haste/DependencyGraph.js:218:16)
at Object.resolve (/home/subrata/puplr_mobile_app/puplr/node_modules/metro/src/lib/transformHelpers.js:141:30)
at dependencies.map.result (/home/subrata/puplr_mobile_app/puplr/node_modules/metro/src/DeltaBundler/traverseDependencies.js:373:31)
at Array.map ()
at resolveDependencies (/home/subrata/puplr_mobile_app/puplr/node_modules/metro/src/DeltaBundler/traverseDependencies.js:369:18)
at /home/subrata/puplr_mobile_app/puplr/node_modules/metro/src/DeltaBundler/traverseDependencies.js:188:33
at Generator.next ()
at step (/home/subrata/puplr_mobile_app/puplr/node_modules/metro/src/DeltaBundler/traverseDependencies.js:298:30)