create-react-native-app icon indicating copy to clipboard operation
create-react-native-app copied to clipboard

No iOS or Android folder after creating a app with create-react-native-app

Open eschao opened this issue 9 years ago • 20 comments

Please make our job easier by filling this template out to completion. If you're requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.

Description

Using create-react-native-app to create application, but I can't find iOS or Android related folders in created application folder.

Expected Behavior

In my memory, they should be created since this is a react native app not a web app.

What action did you perform, and what did you expect to happen?

sudo npm install -g create-react-native-app
create-react-native-app my-app

Observed Behavior

In my-app folder, I only can see the below folders:

App.js App.test.js README.md app.json node_modules package.json

What actually happened when you performed the above actions?

If there's an error message, please paste the full terminal output and error message in this code block:

Error text goes here!

Environment

Please run these commands in the project folder and fill in their results:

Also specify:

  1. Operating system: MacOS 10.12
  2. Phone/emulator/simulator & version: IPhone 6 simulator

Reproducible Demo

Is it normal? I can't make sure since I remember the iOS and android folder will be generated together. If I'm wrong, please correct! Thanks a lot!

eschao avatar Jul 14 '17 06:07 eschao

Its' my fault. I know how to create them now. Close it

eschao avatar Jul 14 '17 06:07 eschao

whats the problem? I have the same issue

bdibenedetto avatar Aug 06 '17 21:08 bdibenedetto

@bdibenedetto - there is no problem. this is intentional. read the readme

brentvatne avatar Aug 09 '17 16:08 brentvatne

The whole situation is not so clear to me from the readme. I know they won't be there but a library i need, requires some modifications in those folders. I could guess that those folders would appear with yarnpkg eject but as it says it's permanent, i don't feel sure about doing it now.

nicoceledon avatar Aug 18 '17 13:08 nicoceledon

I did not understand. Can you give me step to create ios/ android folder

TonyFrancis avatar Oct 23 '17 04:10 TonyFrancis

@TonyFrancis read here: https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md

lasuax avatar Oct 24 '17 08:10 lasuax

One of the points of Expo on top of React Native is that you don't go down to android or ios code. Expo deals with those folders for you, you don't need to interact with them. Is there a reason you need those folders? if so, you will have to detach. Here's the documentation to do so: Detaching with expo

mohamedebrahim96 avatar Jan 02 '18 19:01 mohamedebrahim96

create your app using - react-native init (AppName) It'll create both android and ios folders or you can go to the directory node_modules->react-native

Vijaysuryawanshi1993 avatar Jan 22 '18 06:01 Vijaysuryawanshi1993

Can you help me please? I can't find how to organize the React Native Project, if i created it using "create-react-native-app", and I need to have two "entry point"-files: for IOS and Android as I understood, I can't rename App.js and it is the only one in project

Astarta0 avatar Jan 31 '18 11:01 Astarta0

Create your project using:- react-native init (appname)

Vijaysuryawanshi1993 avatar Feb 01 '18 12:02 Vijaysuryawanshi1993

Hi @Vijaysuryawanshi1993, I have created my react native app with react native init command three weeks ago and I have been working on it since then. Recently, to do some analytics work like showing some line or bar chart, I found the package react-chartjs. However, this package heavily uses canvas and if I decide to add this package in my app, "View config not found for the name canvas". It seemed to me the error is occurring because react native does not support div or html in general. But, then I went to youtube to see some tutorial on chart-js, https://www.youtube.com/watch?v=Ly-9VTXJlnA. In this tutorial, the youtuber created his project with create-react-native-app command and he could easily use

like components in his project. So this might be a stupid question, but does create-react-native has something to do with supporting html components ??

rudra0713 avatar Feb 05 '18 04:02 rudra0713

Read on Detaching to ExpoKit

nosisky avatar Mar 23 '18 14:03 nosisky

@Vijaysuryawanshi1993 : I am facing the same problem and as you stated above I have tried "react-native init (appname)" but no luck, Please guide.

NeerajKumar123 avatar Apr 11 '18 13:04 NeerajKumar123

It seems that the flow changed a little bit. As far as i remember, i just ejected the project with 'react-native eject'. Then android and iOS folders where created. Nevertheless, checkout the README.md ;)

nicoceledon avatar Apr 11 '18 13:04 nicoceledon

https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md#ejecting-from-create-react-native-app

Fed0t avatar May 12 '18 21:05 Fed0t

@eschao . How to generate ios and android folder? Please show me the link? Thanks.

MichaelHuy avatar Sep 11 '18 03:09 MichaelHuy

Those will be created by 'Eject'? This name is a confusing. https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md

TL;DR: Your app created by create-react-native-app <name> will creating app in EasyMode, makes it easy to start working on React Native apps by removing native code build tools from the equation. So what you have to do, is eject from EasyMode.

Nyconing avatar Oct 02 '18 12:10 Nyconing

I am also facing the same issue. I create the project by react-native init App name but android and ios folder is missing

asif11996 avatar Aug 24 '22 10:08 asif11996

If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues:

npm uninstall -g react-native-cli @react-native-community/cli

then create a new project again: npx react-native init DemoApp

JatinBhuva avatar Dec 19 '22 08:12 JatinBhuva

This fixed it for me: npm uninstall -g react-native-cli @react-native-community/cli , previously it was showing no ios or android folders, and completely ignoring the template.

microgold avatar Dec 01 '23 17:12 microgold