No iOS or Android folder after creating a app with create-react-native-app
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:
npm ls react-native-scripts: [email protected]npm ls react-native: [email protected]npm ls expo: [email protected]node -v: v6.9.2npm -v: 4.6.1yarn --version: Not installedwatchman version: "version": "4.7.0"
Also specify:
- Operating system: MacOS 10.12
- 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!
Its' my fault. I know how to create them now. Close it
whats the problem? I have the same issue
@bdibenedetto - there is no problem. this is intentional. read the readme
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.
I did not understand. Can you give me step to create ios/ android folder
@TonyFrancis read here: https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md
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
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
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
Create your project using:- react-native init (appname)
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
Read on Detaching to ExpoKit
@Vijaysuryawanshi1993 : I am facing the same problem and as you stated above I have tried "react-native init (appname)" but no luck, Please guide.
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 ;)
https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md#ejecting-from-create-react-native-app
@eschao . How to generate ios and android folder? Please show me the link? Thanks.
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.
I am also facing the same issue. I create the project by react-native init App name but android and ios folder is missing
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
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.