"The module does not exist in the module map or in these directories" in
I began to study the reaction to my native language. I am struggling in a simple reactive native project when importing new js [example Home.js] in index.android.js I get the following error:
The module does not exist in the module map or in these directories.
UnableToResolveError: Unable to resolve module .src/Components/home/Home/Home.js
from C:\Users\Magi\Dictionary1\index.android.js
: module does not exist in the module map or in these directories:
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import Home from '.src/Components/home/Home/Home.js';
source to share
If Home.js
u index.android.js
are in the same directory, you can replace
import Home from '.src/Components/home/Home/Home.js';
from
import Home from './Home.js';
But if your folder src
is at the same level as index.android.js
, the .
front .
should be src
:
import Home from './src/Components/home/Home/Home.js';
source to share