Open Vishal-Lakkapathri opened 6 years ago
got same problem
npm start -- --reset-cache should resolve the problem. Issue #277 raised regarding need of npm reset cache. the alternative solution to have absolute path is to add a Package.json file in in root directory this should be the content of it : { “name”: “app” }
@kevinNejad I was also getting same issue of module resolver. So, I tried to resolve the issue by ran the command npm start -- --reset-cache but still facing issue. Could you please explained me clearly your alternative solution because i didn't get what exactly we should do?
@vykumar I am surprised why it did not resolved by reseting npm cache. but here is the alternative way of having absolute path. if youre trying to define path from root of your project, e.g. 'app/component/...' rather than '../../component/....' Add a package.json file with { “name”: “FOLDER_NAME” } in it to the folder you’d like to import from. app --actions --reducers --components package.json file with { “name”: “app” }
Yeah, it seems tricky to fix this issue with react-native. I don't exactly know how it works, or how the cache works, but I doubt we can actually do anything about it. There's this other thread about that (#224) and so far, there's no easy fix other than the cache reset...
It very useful package. My assumption is the babelrc file is not loaded by rerunning app. I will have a look at the package later on see if I can spot the reason.It could be because of npm, even if it is, i wouldnt surprise.
Try this way: #292
Unable to find the component. The Application is working fine on MacOS but facing issue on Windows.
I`m using git bash terminal/command prompt to run the packager.
Config: Windows 10(64 bit) node: v8.2.1 npm: 5.6.0
.babelrc
package.json