React Native :unable To Resolve Module Indeed, None Of These Files Exist:
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.
- Stop your development server.
- Install the app on your android device or emulator, using
yarn android/ios
. - Start the development server using
yarn start
.
Solution 3:
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:"