English 中文(简体)
溢溢屏幕上的 App stuck, 无错误
原标题:Expo App Stuck on Splash Screen, No Errors
My app has been working fine but is now stuck on splash screen after building. I have been unable to understand why the issue is occurring. I tried to go back to a much older version of my project that I know was working, but it had the same issue. I deleted node_modules and reinstalled on the old and new versions and they both had the same issue. So, I assumed it was a problem with my development environment. I had a friend clone the repo on his machine and test and he bizarrely got the exact same issue, which makes me think it isn t a problem with the dev environment. I reset my entire machine (MacBook Pro with Apple Silicon) and reinstalled homebrew, watchman, node, yarn, xcode, and expo-cli. Same issue. I tried expo upgrade and expo doctor to try to resolve issues that way. I do not know what steps to take next. I am, however, getting some errors from watchman I will include below. Note this is an expo managed project. Build Logs: (after which app is frozen on home screen) chaserobbins@Chases-MacBook-Pro Handle-Customer-App % expo start -c Starting project at /Users/chaserobbins/Documents/GitHub/Handle-Customer-App Starting Metro Bundler Your JavaScript transform cache is empty, rebuilding (this may take a minute). ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ █ ▄▄▄▄▄ █▄▀▀▄▄ ▀█ █ ▄▄▄▄▄ █ █ █ █ ███▄█ ▀▄▄█ █ █ █ █ █▄▄▄█ ██▄▀▄▀▀▀█▀█ █▄▄▄█ █ █▄▄▄▄▄▄▄█ █ ▀▄▀▄▀ █▄▄▄▄▄▄▄█ █▄ ▀ ▀▄█▀ ▄▄▀▀█▀ █▄█▀█▀▀▄█ █▄▀▄▄█▀▄▄▀▀ ▀▄▄▄▀▀███▄▀▀ █ █▀▄▄█ ▄▄ ▀ █▄▄▀▄ █ ▄▀▀█▀ ██ █ ▄▀▄▀▀▄█▄██ ▄▄█ ▄▀ ██▄▀ █ █▄█▄▄▄▄▄█ ▀▀ █ ▄▄▄ ▄▀▄█ █ ▄▄▄▄▄ ██▀ ▄ ▄█ █▄█ ██▀ █ █ █ █ █ █▀▀▀██▄ ▄ ▄ █▀▀█ █ █▄▄▄█ █▀▀ █▄ ▄█▀▀▄█ █ █▄▄▄▄▄▄▄█▄██▄██▄▄▄▄█▄▄███▄█ › Metro waiting on exp://192.168.0.107:19000 › Scan the QR code above with Expo Go (Android) or the Camera app (iOS) › Press a │ open Android › Press i │ open iOS simulator › Press w │ open web › Press r │ reload app › Press m │ toggle menu › Press ? │ show all commands Logs for your project will appear below. Press Ctrl+C to exit. watchman warning: Recrawled this watch 27 times, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run: `watchman watch-del /Users/chaserobbins/Documents/GitHub/Handle-Customer-App ; watchman watch-project /Users/chaserobbins/Documents/GitHub/Handle-Customer-App ` Recrawled this watch 27 times, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run: `watchman watch-del /Users/chaserobbins/Documents/GitHub/Handle-Customer-App ; watchman watch-project /Users/chaserobbins/Documents/GitHub/Handle-Customer-App ` › Opening on iOS... › Opening exp://192.168.0.107:19000 on iPhone 12 › Press ? │ show all commands iOS Bundling complete 38112ms Here is my package.json { "scripts": { "start": "react-native start", "android": "react-native run-android", "ios": "react-native run-ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@babel/preset-typescript": "^7.18.6", "@expo/config-plugins": "5.0.0", "@expo/vector-icons": "^12.0.0", "@gorhom/bottom-sheet": "^4.1.3", "@react-native-community/hooks": "^2.6.0", "@react-navigation/bottom-tabs": "^6.0.5", "@react-navigation/native": "^6.0.2", "@react-navigation/native-stack": "^6.1.0", "@react-navigation/stack": "^6.0.7", "@stripe/stripe-react-native": "0.2.3", "algoliasearch": "^4.10.5", "expo": "44.0.0", "expo-constants": "13.0.1", "expo-file-system": "13.1.4", "expo-firebase-recaptcha": "2.1.0", "expo-font": "10.0.4", "expo-haptics": "~11.1.0", "expo-image-picker": "12.0.1", "expo-linear-gradient": "11.0.3", "expo-linking": "3.0.0", "expo-notifications": "0.14.0", "expo-status-bar": "1.2.0", "expo-store-review": "5.1.0", "expo-updates": "0.11.7", "firebase": "8.2.3", "moti": "^0.18.0", "node-geometry-library": "^1.2.5", "react": "^18.2.0", "react-dom": "^18.2.0", "react-instantsearch-native": "^6.12.1", "react-native": "0.64.3", "react-native-confetti-cannon": "^1.5.2", "react-native-confirmation-code-field": "^7.3.0", "react-native-gesture-handler": "2.1.0", "react-native-maps": "0.29.4", "react-native-reanimated": "2.3.1", "react-native-safe-area-context": "3.3.2", "react-native-screens": "3.10.1", "react-native-svg": "12.1.1", "react-native-web": "~0.13.12", "react-native-webview": "11.15.0", "shorthash": "^0.0.2" }, "devDependencies": { "@babel/core": "~7.9.0", "eslint": "^8.11.0", "eslint-plugin-react": "^7.29.4" }, "private": true, "name": "Handle-Customer-App", "version": "1.0.0", "resolutions": { "react-native": "0.63.4" } } Any help or troubleshooting tips are much appreciated.
最佳回答
I was able to fix the issue by removing my "resolutions" line in my package.json. It seemed to be causing the issue.
问题回答
In my case I had imports messed up and was creating an infinite loop on the entry page. I was loading App.js from App.js and trying to render it. Check your imports and make sure you re putting what you want into the JSX.
Update for those who are still struggling with this issue on expo, the issue for me was that all my files had been put inside of a (app) folder and my root _layout.tsx was referencing a < Slot />. Removing the (app) and putting all my files in the root fixed it for me
If you only upgraded expo version and nothing else then you ll have a lot of conflicts. Resolve all yarn warnings run yarn upgrade start expo You might have other chained errors. Check for deprecated-react-native-prop-types errors. You can resolve it through patch-package or by removing the dependency.
expo start --no-dev --minify please use above command for start Expo
Tried everything. At last uninstalling and re-installing expo go app worked for me.
Lazy loading my components allowed me to get the app working, and walk through each component one by one on the device to find the issue. ex: const HomeScreen = React.lazy(() => import( ./components/homescreen )); Then wrap your view in an error boundary and stack your components like so {(props) => ( }> )}




相关问题
How to use one react app into another react app?

I have two react apps, parent app and child app. and child app have an hash router. I have build the child app using npm run build, It creates build folder. That build folder moved into inside the ...

how to get selected value in Ant Design

I want to print the selected value, and below is my option list: const vesselName = [ { value: 0 , label: ALBIDDA , }, { value: 1 , label: ALRUMEILA , }, { value: 2 ,...

How to add a <br> tag in reactjs between two strings?

I am using react. I want to add a line break <br> between strings No results and Please try another search term. . I have tried No results.<br>Please try another search term. but ...

热门标签