mjohnston / react-native-webpack-server

Build React Native apps with Webpack
MIT License
933 stars 84 forks source link

TypeError: undefined is not an object (evaluating 'GLOBAL.Text #150

Closed oliviertassinari closed 8 years ago

oliviertassinari commented 8 years ago

Has anyone encountered this issue https://github.com/facebook/react-native/issues/4811? I have tried all the solutions proposed, I couldn't make it work.

philikon commented 8 years ago

I'm assuming you're using nrws? Have you looked at the BabelES6 example? That definitely works.

oliviertassinari commented 8 years ago

I have resolved the issue by moving the .babelrc from the root to my /src folder. For anyone how is encontering this issue, clear the babel cache.

@philikon I have solved my issue (https://github.com/callemall/material-ui/pull/2667) thanks!

philikon commented 8 years ago

Ok cool. I doubt that that src/.babelrc actually gets read by anything. Are you sure it's being used? Moving it to src/ may have had the same effect as simply removing .babelrc...

oliviertassinari commented 8 years ago

Ok cool. I doubt that that src/.babelrc

I have no idea, but I guess babel will do it. I'm following this project https://github.com/benoitvallon/react-native-nw-react-calculator. In my case the source code is also used by webpack (for the browser).