We have CircleCI running a few tests in a React Native project of ours (just testing pure JS functions, not actual React Native code) — and I wanted to use code-push to push a release every time there's a successful build on master.
My problem is that code-push fails during the react-native bundle
stage.
react-native bundle --platform ios --entry-file index.ios.js --bundle-output /tmp/main.jsbundle --dev false
The error is TransformError: /home/ubuntu/my-project/index.ios.js: __DEV__ is not defined
To me it seems like babel isn't successfully transforming the React Native code.
My .babelrc is:
{
"presets": ["react-native-stage-0"]
}
I've tried doing things like deleting all the .babelrc files in node_modules but I still get the same error.