Reputation: 1559
I'm trying to install react-native on Windows by entering command
$ npx react-native
and it shows error
You did not pass any commands, run `react-native --help` to see a list of all available commands.
is their something need to pass at the place of <command>
in npx react-native <command>
Upvotes: 1
Views: 476
Reputation: 1
With new update of React Native 0.76.0, you need to run below cmd.
Change MyProject with your Project Name
npx @react-native-community/cli@latest init MyProject --version latest
For Android Device - Add local.properties inside android
Add the below code and replace yourUsername
sdk.dir = C:\\Users\\{yourUsername}\\AppData\\Local\\Android\\Sdk
If you got any error, try installing packages again by
npm i
And then
npm react-native doctor
After this you are ready to start your dev server by
npx react-native run-android
Upvotes: 0
Reputation: 26
If you already installed node js, then run the commons using:
npx react-native init YourProject
It will download all the resources required for your project. When the resources are downloaded, move to the project folder with
cd YourProject
and type the following command:
npx react-native run-android
Make sure either the emulator is running or your device is connected with your pc.
Upvotes: 1