Hi guys, I'm trying to import model.json file as you can see in the VS its right there! why is it still failing to import it? am I missing something?
4 Answers
If I understand correctly, your "FaceApp.tsx" is inside "components" directory and the JSON your trying to load is in "assets" directory which is not inside the "components" directory.
When you use the "./" prefix you basically saying that you want to load the file from the current directory. thus, using "./assets/model/model.json" will evaluate as "components/assets/model/model.json".
Try using "../assets/model/model.json" instead.
Hope this helps, let me know.
Comments
Try clearing cache using yarn start --reset-cache Ref: https://github.com/facebook/react-native/issues/1924
