Unexpected token in iaphub.tsx
fabian0409 opened this issue · 5 comments
Hi all,
first of all: I'm pretty sure that the issue is on my end, but I'm completely lost...
I've updated to version v7.0.14 and ever since I'm seeing attached Error message in the emulator. My react-native version is 0.61.5 and I've had to set the SWIFT_VERSION
(by creating an empty Swift file) and add the following code to the Podfile to allow me to pod install
:
pod "React-Core", :path => "../node_modules/react-native/", :modular_headers => true
I've cleaned the build folder and then built the app from XCode.
Any help would be greatly appreciated.
Hi @fabian0409,
To be honest we've never seen this issue before so it is pretty difficult to help.
It seems like for some reason you're loading the files in the src
directory of the module, it should instead load the files in the lib
directory (compiled files).
I would also recommend using the latest version of the library (8.1.4).
Thanks for your reply @iaphub. I've never seen it before either, that's why I'm asking for help. ;)
I've updated to version 8.1.4 and I'm still seeing the same issue for both iOS and Android. Everything worked fine with v6.2.1 and I did not change anything in the overall project config. Do you have any idea why the files are being loaded from the src
instead of the lib
directory? Unfortunately I have absolutely no clue how to solve this issue.
We were not using typescript in the v6 of the library, which is probably why it used to work on your project.
Your React Native dependency is pretty old, I would recommend updating it.
Thanks for pointing me in the right direction @iaphub. I had to update @babel/core and @babel/runtime like this:
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/runtime": "^7.9.2",
//other dev dependencies
}
I found this information in the following comment:
react-native-device-info/react-native-device-info#1167 (comment)
Just wanted to leave it here in case anyone else is having a similar issue.
Thanks for sharing @fabian0409, happy to hear you found the issue 👍