create-expo-cljs-app
create-expo-cljs-app copied to clipboard
Unable to resolve "../../App" from "node_modules/expo/AppEntry.js"
HI,
I've been struggling all day with getting the basic app generating and working and have managed to get to the point where yarn start
and shadow-cljs watch
seem to function well but when I try to launch the app on a phone, I get Unable to resolve "../../App" from "node_modules/expo/AppEntry.js"
From what I can tell this is something to do with node_modules/expo/AppEntry.js
hardcoding a path to look for App.js
in the root dir but the template has not generated this.
I noticed that in app.json
the following is set:
...
"entryPoint": "./build/index.js",
...
When I run yarn start
I get
iOS Bundling failed 9ms
Unable to resolve "../../App" from "node_modules/expo/AppEntry.js"
iOS Bundling failed 12ms
Unable to resolve "../../App" from "node_modules/expo/AppEntry.js"
After I try to connect on the phone.
I can see that AppEntry.js
is hard coded to load an App file from the root:
import registerRootComponent from 'expo/build/launch/registerRootComponent';
import App from '../../App';
registerRootComponent(App);
There were a couple of errors prior to this which I managed to fix by
Setting the react-native version in package.json
to
"react-native": "^0.72.6",
cd ${app-dir}
yarn add expo
yarn expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
yarn expo install --fix
Any help welcome.
By upgrading the react versions I am able to get past this, and then I ran into : Unable to resolve "create-react-class" from "build/index.js"
React has deprecated this (see here )and it got moved to a separate dependency which you then have to add:
yarn add create-react-class
It works now. Also getting issues with The global expo-cli package has been deprecated
I. managed to get past this at some point but its back now will continue to investigate
This is because you no longer need expo-cli
as a dependency so this can be removed from the package.json But when you do this a whole heap of other things break