ds300 / react-native-typescript-transformer

Seamlessly use TypeScript with React Native
MIT License
657 stars 49 forks source link

Getting error "Cannot read property 'ReactCurrentOwner' of undefined" #7

Closed cliffkoh closed 7 years ago

cliffkoh commented 7 years ago

Using https://github.com/ds300/TestCustomSourceExts as a starting point and replacing React Native with 0.45-rc.2, with the latest npm published version of react-native-typescript-transformer, and starting the packager through CLI:

react-native start --reset-cache --transformer node_modules/react-native-typescript-transformer --sourceExts ts,tsx

I am hitting the error (in the iOS simulator)

Cannot read property 'ReactCurrentOwner' of undefined"
 in ReactGlobalSharedState.js:18:36

Would you know what I am missing here?

Thanks!

ds300 commented 7 years ago

I've seen that error before. IIRC it has something to do with a version clash between react-native and react.

Do you get the error if you use a fresh react-native project as a starting point instead of that test repo?

cliffkoh commented 7 years ago

Thanks, I don't if I use a fresh react-native project instead. I will close the issue. Thank you by the way, for your work here :)