Fail to import package other than React VR itself. #453
Comments
We use Metro, the bundler from React Native, to compile your React VR apps. The problem is that the package you are trying to import seems to have its own babel presets, and does not support being included in React Native projects. Unfortunately there's nothing we can do on our end to fix this, it's an issue with how the mathjs package is being delivered. We will be performing a Metro upgrade soon, that may provide a way to work around this, but I cannot be certain. |
@zzc-tongji looking at the error:
It looks like it has to do with the |
I have no problem with changing |
Confirmed on latest create-react-native-app template also, MathJS cannot be used due to same env escape-latex transformer error. [Fix] Using version 3.9.3 of MathJS fixes the issue with CRNA, was previously attempted with 4.2.1. this might work with VR |
So that it doesn't get picked up by bundlers like Metro See: facebookarchive/react-360#453 (comment)
@josdejong I've made some changes to |
Thanks @dangmai that's good news. I've just released @zzc-tongji can you check whether this solves the issue? |
I can't speak for react-360 or ReactVR, but in my own ReactNative project, upgrading mathjs from 4.0.1 to 4.2.2 resolved the |
Thanks for the feedback @iffy |
Problem
I use
react-vr init demo
to create a React VR project. It works.However, after using
npm install --save mathjs
and add it to the project:When I start it by using
npm start
and visithttp://localhost:8081/vr/?hotreload
by browser, I cannot see anything. The terminal says:In order to exclude bugs of React itself, I do the same thing on it: create project
create-react-app hello-react
, install packagenpm install --save mathjs
and add it to the project:It works.
So how to solve the problem of React VR? Is there a correct way to import package other than React VR itself?
Additional Information
The text was updated successfully, but these errors were encountered: