Reputation: 173
My package.json
file is as below
{
"name": "dev",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-beta.5",
"react-native": "0.49.3"
},
"devDependencies": {
"babel-jest": "21.2.0",
"babel-preset-react-native": "4.0.0",
"jest": "21.2.1",
"react-test-renderer": "16.0.0-beta.5"
},
"jest": {
"preset": "react-native"
}
}
When I run npm start
it gets stuck on Loading dependency graph, done. How can I fix this?
Upvotes: 1
Views: 1421
Reputation: 106
npm start
only works for expo projects, if you've created your project using react-native init
You should run your project using either react-native run-ios
or react-native run-android
If you're sure you're using expo for your project I would suggest to remove the node_modules
folder and running npm install
again.
Upvotes: 2
Reputation: 6026
If you built your app using react-native init
or if it is an app that has been "ejected" from Expo, then this behavior is normal. Once you have npm started, open another terminal window and run either react-native run-ios
or react-native run-android
. That should launch the appropriate app for you.
The Getting Started Guide can walk you through the various ways of starting a react native app. You should follow the tab labeled "Building Projects with Native Code."
Upvotes: 0