Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why do I get react-native command not found error on windows pc?

Tags:

react-native

I am very new to React-native and I have a sample project when I tried running the command react-native run-android. I got an error command not found.

like image 680
Jack Avatar asked Jan 29 '26 10:01

Jack


2 Answers

in the current directory do

react-native -v

you will get the following

react-native -v
react-native-cli: version
react-native: version

if it shows command not found the n you have not installed react native in the directory. Do a npm init in new folder and try installing a new react native project there by doing npm install -g react-native-cli Follow the steps to add path variable react-native.

You're good to go.

like image 82
Akshay Mulgavkar Avatar answered Jan 31 '26 19:01

Akshay Mulgavkar


Have you run 'npm install' (without parameters) in the project directory? That'll install the dependencies for your project.

Details here: https://docs.npmjs.com/cli/v6/commands/npm-install

like image 23
eegor jones Avatar answered Jan 31 '26 17:01

eegor jones



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!