Closed pehlert closed 7 years ago
Thanks for the report! Can you be more explicit about exactly what had to change in the rn-cli.config.js ? I'm not sure what you mean by 'new style'.
Sure! I was not using rn-cli.config.js before at all but had the following in my app.json:
"expo": {
"packagerOpts": {
"sourceExts": ["ts", "tsx"],
"transformer": "node_modules/react-native-typescript-transformer"
}
}
}
If this looks unfamiliar to you, I cannot fully rule out that I have taken it from a tutorial elsewhere on the web, but apparently this has effected others as well.
Maybe from here: https://github.com/dalcib/expo-ts-example/blob/master/app.json ? Anyhow, this is a create-react-native-app/expo thing. The README for this project has always advised using rn-cli.config.js. I'm glad expo is supporting it directly now.
Thanks for creating this issue and linking it to the expo issue. I think that's enough for people to land here from github/google searches.
Let's test: if you're reading this issue give the top comment a tada :tada: if you landed here from github/google search and it solved your problem :+1:
I'm going to close this issue because I think the problem is solved. Feel free to reopen the issue if you feel that there is anything left to address.
It's necessary to add /index.js
to the transformer
property in app.json
to make it work with Expo version 19. Don't know why. See https://github.com/expo/expo/issues/428#issuecomment-318491235.
"packagerOpts": {
"sourceExts": [ "ts", "tsx"],
"transformer": "node_modules/react-native-typescript-transformer/index.js"
}
Thanks to @janaagaard75 https://github.com/janaagaard75/expo-19-typescript
There is an issue that occured to me after upgrading react-native-typescript-transformer to the latest version. This is very confusing at first as there doesn't seem to be any relation to this package.
The issue can be solved by using the new
rn-cli.config.js
config style as described in the latest README. It would be great if this upgrade issue could at least be pointed out somewhere.Details on the issue can be found here: https://github.com/expo/expo/issues/407