ds300 / react-native-typescript-transformer

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

Adding third-party library results in white-screen #5

Closed cbrevik closed 7 years ago

cbrevik commented 7 years ago

Adding bugsnag-react-native and importing it in file results in white-screen in app.

When stepping through code in debugger, it is still calling the relevant render() functions of components, so not sure why it behaves like this.

Reproducible code here.

ds300 commented 7 years ago

Again, that commit works fine for me on iOS and Android. Did clearing the cache help with this too?

cbrevik commented 7 years ago

Of course it did, sorry for wasting your time. 😞

Find it a bit weird that I have to do that for both issues though. I didn't do anything special I wouldn't have done otherwise while setting up a project.

cbrevik commented 7 years ago

Think I might have uncovered why I got this problem.

I'm having an issue with VSCode not finding the bugsnag-react-native module with intellisense: image image

I tried changing to "module": "commonjs" in tsconfig, which solved the intellisense. That seems also to have caused the white screen though. Just re-running normally then with "module": "es2015" wasn't enough.

ds300 commented 7 years ago

I think you need to set "moduleResolution": "node" in tsconfig.json's compilerOptions