Mac Create React Native App Install Command Not Found

renewprofessional
5 min readJun 11, 2021

Download here

Problem

  1. Mac Create React Native App Install Command Not Found Directly
  2. Mac Create React Native App Install Command Not Found Dead
  3. Mac Create React Native App Install Command Not Found Within
  4. Mac Create React Native App Install Command Not Found Windows 10

‘react-native’ is not recognized as an internal or external command

While ejecting your project out of the Expo environment you can face this problem.

Solution

We will install create-react-app using npm. On terminal run the install command shown below. Npm install -g create-react-app. On successful installation you should see the output like above (note your create-react-app version may be different by the time you run this install command) Test create-react-app. To test the create-react-app, run below command.

To solve this problem, the solution is simple just install react-native-cli using the following command.

Mac Create React Native App Install Command Not Found Directly

The command will install the react-native-cli on your command line and you can use your react-native command which is located here

C:UsersAdminAppDataRoamingnpmreact-native -> C:UsersAdminAppDataRoamingnpmnode_modulesreact-native-cliindex.js

This guide will help you to get started using React Native on Windows to create a cross-platform app that will work on Android devices.

Overview

Mac Create React Native App Install Command Not Found Dead

React Native is an open-source mobile application framework created by Facebook. It is used to develop applications for Android, iOS, Web and UWP (Windows) providing native UI controls and full access to the native platform. Working with React Native requires an understanding of JavaScript fundamentals.

Get started with React Native by installing required tools

  1. Install Visual Studio Code (or your code editor of choice).
  2. The Free OpenSource Software Mac User Group (aka FreeSMUG) has bundled up portable versions of several popular open source Mac apps that you can run from your iPod or other portable device. It does work on Mac but via either Crossover or Wine. Same as it does on Linux. The important apps like Firefox will run quite nicely. And, unlike the discontinued portable native Mac apps mentioned above, your passwords and such will be self-contained and not wind up in the Keychain on the local machine (something you generally don’t want with portable software). How to run portable apps on mac. For those who use both Mac and PC. There is a way to run both PC and Mac portable apps on a USB flash drive seemlessly by creating a HFS+ formatted sparse. Running Windows software on a Mac. To run your app once installation has completed, open Crossover Office if it isn’t already open, and ensure the All Bottles link at the top left is selected.
  3. Install Android Studio for Windows. Android Studio installs the latest Android SDK by default. React Native requires Android 6.0 (Marshmallow) SDK or higher. We recommend using the latest SDK.
  4. Create environment variable paths for the Java SDK and Android SDK:
  • In the Windows search menu, enter: ‘Edit the system environment variables’, this will open the System Properties window.
  • Choose Environment Variables.. and then choose New.. under User variables.
  • Enter the Variable name and value (path). The default paths for the Java and Android SDKs are as follows. If you’ve chosen a specific location to install the Java and Android SDKs, be sure to update the variable paths accordingly.
  • JAVA_HOME: C:Program FilesAndroidAndroid Studiojrejre
  • ANDROID_HOME: C:UsersusernameAppDataLocalAndroidSdk
  1. Install NodeJS for Windows You may want to consider using Node Version Manager (nvm) for Windows if you will be working with multiple projects and version of NodeJS. We recommend installing the latest LTS version for new projects.

Note

Mac Create React Native App Install Command Not Found Within

You may also want to consider installing and using the Windows Terminal for working with your preferred command-line interface (CLI), as well as, Git for version control. The Java JDK comes packaged with Android Studio v2.2+, but if you need to update your JDK separately from Android Studio, use the Windows x64 Installer.

Mac Create React Native App Install Command Not Found Windows 10

Create a new project with React Native

  1. Use npm to install the Expo CLI command line utility from the Windows Command Prompt, PowerShell, Windows Terminal, or the integrated terminal in VS Code (View > Integrated Terminal).
  2. Use Expo to create a React Native app that runs on iOS, Android, and web. You will need to then choose between project templates, which include blank, blank (TypeScript), tabs (example screens using react-navigation), minimal, or minimal (TypeScript).
  3. Note
  4. If you’re used to using npx create-react-native-app, that will still work, but the Expo-CLI init has a few additional benefits.
  5. Open your new ‘my-new-app’ directory:
  6. To run your project, enter the following command. This will open a localhost window in your default internet browser displaying Node Metro Bundler. It will also display a QR code in both your command line and the Metro Bundler browser window. *You can use the command: npm start or npm run android as well.
  7. To view your project running on an Android device, you will need to first install the Expo Client app with the Google Play Store on your Android device. Once the Expo client app is installed, open it on your device and select Scan QR Code. Once the QR code is registered, you will be able to see the package build both on your device and in the Metro Bundler window running on localhost in your browser.
  8. To view your project running on an Android emulator, you will first need to open Android Studio, then create and start a virtual device. Tools > AVD Manager > + Create Virtual Device… Once your virtual device is created, select the launch button ▷ under the Actions column of the Android Virtual Device Manager to start emulating the device. Once the virtual device is open, return to the Metro Bundler window running in your internet browser window and select ‘Run on Android device/emulator’ from the left column. You should see a pop-up letting your know that Metro Bundler is ‘Attempting to open a simulator..’ and then see the Expo Client app open in your emulated Android device and, once it’s finished downloading the JavaScript bundle, you will see your React Native app displayed. (If you run into problems, check the Expo Android emulator docs.)
  9. Open the your React Native project to start working on your app. You should see your changes auto-updated in the app running via the Expo Client on your device or in your Android Emulator.
  10. Try changing the landing page view text to say: ‘Hello World!’. You can do this in the IDE of your choice. (We recommend VS Code or Android Studio.) The landing page file will differ depending on the template that you chose. It may be App.js, App.tsx, or HomeScreen.js.
  11. Try adding an image. First, you’ll need to create a folder at the same level as the ‘android’ and ‘ios’ folders in your app, let’s call it ‘images’. Place an image in that folder, your-image.png for example. Use the format below to reference your image and style it with a height and width.

Tip

If you want to add support for your React Native app so that it runs as a Windows 10 app, see the Get started with React Native for Windows docs.

Additional resources

Download here

--

--