Skip to content Skip to sidebar Skip to footer

React Native :unable To Resolve Module Indeed, None Of These Files Exist:

I'm following this medium article to use FloatingTitleTextInputField in my react-native project below is my project structure Here is my code for HomeScreen.js import React, {Comp

Solution 1:

You're referencing it from the HomeScreen component which is in the screens directory. Because you're using the local ./ path, it's trying to find it in screens/customComponents. Using ../customComponents/floating_title_text_input_field should fix it.

Solution 2:

Even though your mistake was using the wrong path during the require statement, I think it might be useful to share how I solved this issue, where file import path wasn't the reason for the error. I encountered this issue after I added some image assets and required them in my components. But I forgot to build the app again. After several attempts, this is the solution that worked for me.

  1. Stop your development server.
  2. Install the app on your android device or emulator, using yarn android/ios.
  3. Start the development server using yarn start.

Solution 3:

You can clean the cache on your bundler:

npm start--clean-cache

Solution 4:

The FloatingTitleTextInputField component seems a named export. So import it like import { FloatingTitleTextInputField } from 'the source'.

Or simply default export the FloatingTitleTextInputField like export default class FloatingTitleTextInputField in the floating_title_text_input_field.js file.

Post a Comment for "React Native :unable To Resolve Module Indeed, None Of These Files Exist:"