New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Typescript projects created with the CLI do not build correctly #24
Comments
Thanks for the issue. Right now I really can't find the time to have a deeper look but I quickly read through the issues to find out what this is about. What I can say so far: The only thing this template does now is adding type definitions for React & RN, replacing the App.jsx with the App.tsx, adding a .tsconfig file which is only being used to do type checking and removing obsolete files like Does anyone else have the same issue? Could someone have a deeper look at this? |
Hi @bartolkaruza, So I took the time and tried to reproduce the issue but I couldn't. Therefore I'm going to close this issue. If you think this is wrong and I should reopen it, I'd be happy if you could create a sample repository where this issue occurs, so I can check it out and see what's going on. |
Thank you for taking the time @emin93, I really appreciate it. The original issue was not mine, so I wouldn't be able to even tell you if this is still a problem. |
I can reproduce it with a starter project: $ react-native --version
react-native-cli: 2.0.1
react-native: 0.58.5
$ react-native init testApp --template typescript
$ cd testApp
$ ./node_modules/.bin/tsc
|
Please execute the setup.js post installation script first after creating the project. This should fix the issue for you. Note that this is just a one time execution (see Readme file for detailed explanation). With the next React Native version, the CLI will allow this to happen automatically, so you don't need to execute the setup.js manually anymore. |
Ah ok that was my issue, I didn't know you had to run a post installation script, though that makes me wonder why the CLI doesn't just run this script automatically when it creates the project? |
@Sean-Brown-Digi In that case, please check out the |
Moved here from an issue posted on React Native core: facebook/react-native#22914
The run-android part, is covered on this react-native-cli issue react-native-community/cli#65
Maybe you could have a look at point 1 of that RN issue regarding the generated project using this template?
The text was updated successfully, but these errors were encountered: