TransformError react native 0.7.1 - react-native

when i build my react-native application using Xcode and launch it, the emulator shows the error red screen with the following message:
TransformError: /path/to/app/index.ios.js: /path/to/app/index.ios.js: Cannot read property 'line' of undefined]
message: 'TransformError: /path/to/app/index.ios.js: /path/to/app/index.ios.js: Cannot read property \'line\' of undefined',
I've built one application a month ago with react-native v 0.4.x and i've never had this message.
I've tried with node 0.12 and different versions of iojs
I'm using react-native v0.7.1 and xCode v6.4
The project is totally empty of any code wrote by me, i just:
$ react-native init reactNat (with react-native-cli v0.1.4)
I read that now react-native is directly integrated with babel and I suppose the problem came from that but with no more clues.
If anybody have an idea it would be very nice!
Thanks guys

You'll need to use node.js >= 4.0, as per the 'getting started' guide. You can use nvm to install multiple node versions on your system.

Related

How to use titanium inspector using titanium 5.2.2?

I am using Appcelerator titanium CLI to build ios app. I want to debug the app With Chrome DevTools but it seems like it's not compatible with the version which I have installed currently.
As per ti-inspector documentation, I have installed the node package by the below command.
npm install -g ti-inspector
So, When I tried this into my titanium project directory I am getting this response which is unexpected.
tn-inspector
Unexpected error: undefined
NOTE: titanium version - 5.2.2
Useful GitHub link: https://github.com/omorandi/TiInspector
Need help to understand or mitigate this issue. Thanks in advance!!!.
That repo is 5 years old and might not be compatible with the current SDK. You can use this instruction: https://docs.axway.com/bundle/Appcelerator_Studio_allOS_en/page/debugging_android_apps_with_3rd-party_tools.html to use the internal dev tools connection.

cannot create iOS folder on my react native app

I am asking this question for the third time and I don't get it why no one even tries to help on this, is this question not well explained? If you can ask for more information I can give!
I am having trouble created iOS folder inside my react native app(detached) as when I created the app I created it from windows machine and iOS folder didn't come when I wrote: exp detach
Now that I have got a macOS, how can I get to create iOS folder so I can use that to build from xCode. I tried react-native upgrade, this is telling me that I have some version conflicts, so I don't want to upgrade it actually, I just want to have iOS folder on my react native.
What would be the best solution in here?
Interestingly I tried exp detach over my detached app and it created iOS, it's working! hopefully this will help anyone!
Please follow the below steps:
Step I: Ensure below installable are installed
Java Sdk Android Studio
Xcode (in case of OSX)
HomeBrew (in case of OSX to install node)
Node/NPM (Node runs Javascript outside the browser. NPM is used for installing and managing Dependencies. Node and NPM come
together)
Those are some essential installs that you will need in your Project
**Step II: **
For windows/OSX you need to run the following commands in your command prompt/command line:
This is the important part for running a react native project:
**Step II: **
npm install -g react-native-cli
Then you can use this cli to start a new project like this:
**Step III: **
react-native init
Hope this helped you, please vote..

react-native error when going over tutorial at react native site

I am a complete beginner, so please provide some explanation.
I am following react-native tutorial at https://facebook.github.io/react-native/releases/0.19/docs/tutorial.html
I run command to init project, I just call it Movies instead of AwesomeProject as the tutorial explains.
Then I copied the complete code from the bottom of the tutorial into my index.ios.js, save the project and refreshed emulator and I get this error
error: bundling failed: "TransformError:
/Users/dinob/reactnativework/Movies/index.ios.js:
Unexpected token ) (While processing preset:
\"/Users/dinob/reactnativework/Movies/node_modules/
babel-preset-react-native/index.js\")"
React-native-cli: 2.0.1
React-native: 0.47.1
React: 16.0.0-beta.2
What I can see is, the tutorial you're following is for RN 0.19 while the newest stable version is 0.47. All the examples codes inside those use the older ES5 syntax and the not newer class based syntax that came in ES6/ES2015
Firstly, please make sure you're following the newest tutorial version and its code. You can do that from here.
https://facebook.github.io/react-native/docs/tutorial.html
The error which I can see there is related to a babel transform and could possibly be attributed to newer version of React Native plus a newer version of React running older code. So you should probably start with a newer tutorial and take it from there.
Also, the use of react-native-cli is now depreciated. You should use create-react-native-app to start a new project. It's all in the docs.
Hope it helps!

undefined is not a function (evaluating 'transform.forEach')

When I run a new react-native app in Android device I am getting this Error:
undefined is not a function (evaluating 'transform.forEach')
I had
node version 7.9.0
react-native-cli version 2.0.1
react-native version 0.44.0
npm version 4.2.0
I use Windows 10 (64 bit).
After six hours spent debugging react proptype validation and then digging a level deeper into packaging internals, I figured out a brain-dead simple solution:
react-native start --reset-cache
I've read a lot and tried all different answers, but after days trying, here is what works:
- Run terminal in admin mode (I'm under windows)
- Change the directory to another with a shortest path
- Change the directory to outside dropbox
- Pushed the code from GIT (starting from zero)
I can't say what step is the responsible, but it's a little effort to do everything in the same time... And it worked!

"babelHelpers.interopRequireDefault is not a function" when upgrading to React Native 0.16.0-rc

I upgraded to react-native 0.16.0-rc, ran npm install, then ran react-native upgrade. When trying to launch the iOS app in a simulator (or device, doesn't matter) I get the error:
[error][tid:com.facebook.React.RCTExceptionsManagerQueue] Unhandled JS Exception: babelHelpers.interopRequireDefault is not a function. (In 'babelHelpers.interopRequireDefault(_reactNative)', 'babelHelpers.interopRequireDefault' is undefined)
I've just about run out of ideas here. Is there something I need to add to my xcode project maybe? Merging the latest react-native templates into mine was a nightmare so maybe something got messed up there.
This problem is discussed in this Github issue and fixed by this commit. You can apply this patch temporarily until it is merged into the project with the version 0.16.