You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to setup the sample repo from scratch, the project crashes on start with the below error when setup with react-native@0.65.2 and @babylonjs/react-native-iosandroid-0-65 on Android. I have checked on emulators Pixel 2 API 29 and Pixel XL API 31. Cloning the sample repo and running it directly works without a problem. But when I remove package-lock.json and run, it starts breaking again
Error:
Unexpected token '='
no stack
Android error stack:
2022-09-08 14:40:56.471 17190-17307/com.babylon65 E/unknown:ReactNative: Exception in native call from JS
com.facebook.react.devsupport.JSException: Unexpected token '='
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loop(Looper.java:214)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
at java.lang.Thread.run(Thread.java:919)
Caused by: com.facebook.jni.CppException: Unexpected token '='
no stack
... 7 more
To Reproduce
Follow the setup steps in the sample repo
> react-native init babylon65 --version 0.65
> cd babylon65
> npm i --save @babylonjs/react-native @babylonjs/react-native-iosandroid-0-65 @babylonjs/core @babylonjs/loaders react-native-permissions@3.0.0
> npm install -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer
> vi tsconfig.json #Copy the config from the repo
> vi jest.config.js #Copy the config from the repo
> mv App.js App.tsx
> vi App.tsx #Copy App.tsx from [the repo](https://github.com/BabylonJS/BabylonReactNativeSample/blob/main/App.tsx)
> npm start
> npm run android
Alternatively, following the below steps also gives the same error
git clone https://github.com/BabylonJS/BabylonReactNativeSample.git
cd BabylonReactNativeSample
rm package-lock.json
npm install
npm start
npm run android
Repo with the error-ing package-lock.json for reference:
git clone https://github.com/kbhokray/babylon65
npm install
npm start
npm run android
Expected behavior
The application should run without an error
Screenshots
Other
Platform: Android
nodejs v16.17.0 (also checked with v14.17.0)
Since it looks like it's a babel error, I also tried adding the below in babel.config.js as mentioned in babel's repo. Even that doesn't seem to work
When I try to setup the sample repo from scratch, the project crashes on start with the below error when setup with
react-native@0.65.2
and@babylonjs/react-native-iosandroid-0-65
on Android. I have checked on emulators Pixel 2 API 29 and Pixel XL API 31. Cloning the sample repo and running it directly works without a problem. But when I removepackage-lock.json
and run, it starts breaking againError:
Android error stack:
To Reproduce
Follow the setup steps in the sample repo
Alternatively, following the below steps also gives the same error
Repo with the error-ing
package-lock.json
for reference:Expected behavior
The application should run without an error
Screenshots
Other
Since it looks like it's a babel error, I also tried adding the below in
babel.config.js
as mentioned in babel's repo. Even that doesn't seem to workThe text was updated successfully, but these errors were encountered: