0

I'm new to reactnative. I have followed steps to install reactnative properly but, while creating a new project, I'm getting an error. I'm using Windows 7 64 bit with i3 processor.

c:\ReactNativeProjects>react-native init AwesomeProject

Command npm install --save --save-exact react-native failed.

My Folder contains only one file My Folder contains only one filee Getting Error in cmd

iOS Lifee
  • 2,091
  • 23
  • 32

2 Answers2

0

These are my steps to get rid of this error:

  1. Please upgrade your npm

npm install -g npm@latest

  1. Run npm cache clean command in Command prompt ( With some element of doubt for cache presence)

3.Ran react-native init in command prompt as Administrator (on Windows OS), hoping works well with sudo react-native init on Mac OS

If still problem persist make sure that you have followed each and every step mentioned in Documentation i.e. installed JDK, PYTHON, NODE. Refer to this link For windows

Karan sharma
  • 1,511
  • 1
  • 13
  • 37
0

Since you are starting to use React Native, consider using Expo, I've used it and it makes developing, debugging, testing and deploying to the apple store and google play easier.

According to the official docs:

Expo is the easiest way to start building a new React Native application. It allows you to start a project without installing or configuring any tools to build native code - no Xcode or Android Studio installation required (see Caveats).

Assuming that you have Node installed, you can use npm to install the Expo CLI command line utility:

npm install -g expo-cli

Then run the following commands to create a new React Native project called "AwesomeProject":

expo init AwesomeProject

cd AwesomeProject
npm start

This will start a development server for you.

I've answered a question in SO for the steps and what happens when you build your .apk and .ipa files using Expo, have a look at that as well.

c-chavez
  • 7,237
  • 5
  • 35
  • 49