Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-native' installation generates error as - 'react-native' is not recognized as an internal or external command, operable program or batch file

Tags:

react-native

First, npm install -g react-native-cli command executed well. but react-native init SampleReactNativeProject command generated error as - 'react-native' is not recognized as an internal or external command, operable program or batch file.

enter image description here

I tried lot of solutions but not a single solution works for me.

I have installed node 8.9.4, npm 5.6.0, Android Studio 3.2.1. Also I set variables - C:\Users\JOHN\AppData\Roaming\npm, D:\Android_Data\Android\sdk\platform-tools, D:\Android_Data\Android\sdk\platform-tools\adb.exe, C:\Program Files\nodejs,

What to do now? Any suggestions?

like image 342
Sanchit Mahajan Avatar asked Dec 24 '22 02:12

Sanchit Mahajan


1 Answers

Add to your PATH Environment Variable the location of your npm. Usually it's located at:

C:\Users\USER_NAME\AppData\Roaming\npm

There you will find react-native.cmd

reactnpm

like image 64
Vencovsky Avatar answered Dec 25 '22 23:12

Vencovsky