For some reason when I want to start my React Native project, it's stucks at 'Starting Packager...' part. I tried to delete the node packages, and reinstall them, intall them via yarn, npm, but no luck. I got no idea how should I fix this :/ (so awkward)
相关问题
- React Native Inline style for multiple Text in sin
- How Do I Convert Image URI into Byte Expo
- ApolloClient from apollo-boost attemped to assign
- Implementing ssl pinning in a react-native applica
- React-Native: Enable Performance Monitor in produc
相关文章
- Why do we have to call `.done()` at the end of a p
- Remove expo from react native
- React Native - Dynamic Image Source
- “Unfortunately, app has stopped” error with buildi
- eslint Parsing error: Unexpected token =
- How to determine JS bottlenecks in React Native co
- How to override navigation options in functional c
- PanResponder snaps Animated.View back to original
I had the same issue. I solved it by changing react-native-scripts version from "^1.14.1" to "1.14.0" and run npm install again.
after a long search I found a solution for this problem:
first,check react,react-native,and expo version are they compatible, goto here
Then you must install watchman, goto https://facebook.github.io/watchman/docs/install.html. Check watchman has installed by:
result:
After that, type in terminal or cmd:
result:
}
look in the
"roots"
section:if
"roots"
not empty, you must shutdown watchman process, typing this in terminal or cmd:result:
}
run again
watchman watch-del-all
you will get result with empty roots like this:}
after that you can run
npm start
oryarn start
or other command to start your react-native project.if the problem still occurs, repeat the above method several times, make sure the
"roots"
are empty! in my case, even I had to repeat it up to 3 times.There could be multiple reasons for the issue. For the most recent version of react-native (Aug 2018), what you might need to do is just press 'q', it will displays the QR code.
After that, you use the expo app scan the QR code, it should start to bundle the scripts and load it to your phone.
If not, you have might another issue which is caused by the incompatibility among React-Native, React and Expo. If you are using Expo 27, you should use reactive-native 0.55.
There is a complete matrix here, https://github.com/react-community/create-react-native-app/blob/master/VERSIONS.md
Anyone who face problem after running
npm audit fix
, that is because it will try to install react-native 0.56 which doesn't work with Expo 27 well. So don't runnpm audit fix
. Just runnpm install react-native@0.55.0
. (As time progress, the version might be different. Make sure you follow the link above to find out the compatible versions.)