Finally I complete install shoutem (many errors occurred...), however when i execute react-native run-ios, i met 2 errors.
First:
SyntaxError /User/projectpath/node_modules/@shoutem/ui/theme.js: Unexpected token (885:22)
So I fix this (by just remove specific code from theme.js), second one has bee occurred.
Unable to resoleve module react/lib/NativeMethodsMixin from /Users/projectpath/node_modules/@shoutem/amination/Parallax.js: Module does not exist in the module map or in these directories:
/Users/projectpath/node_modules/react/lib
I tried this with
And error message also mentioned that
but that didn't solve this issue. Does anyone face this issue?
I also had this issue and managed to fix it.
Since React 15.4.0 React moved the renderers to their individual npm packages.
See here
So NativeMethodsMixin was moved from the React package to the React Native package.
All you have to do is change one line of code in node_modules/@shoutem/animation/Parallex.js
Remove line 2:
import NativeMethodsMixin from 'react/lib/NativeMethodsMixin';
And edit the react-native import to this:
import { Animated, View, Dimensions, NativeMethodsMixin } from 'react-native';
This resolved the issue for me.
I will file an issue at the animation github repo it uses.
thank you for posting the fix, worked fine for me too.
i think the Shoutem folks should get this sorted asap as anyone new / trying out the toolkit (via latest react-native init ..) will just see a red screen / broken build.
Hey guys! Thank you with this one, we have fixed syntax error introduced with this #80 pull request. I will address issue with Parallax on animation repo today!
Thank you one more time, you are helping us a lot!
Thanks @TimIJpenga , it works!
Most helpful comment
I also had this issue and managed to fix it.
Since React 15.4.0 React moved the renderers to their individual npm packages.
See here
So NativeMethodsMixin was moved from the React package to the React Native package.
All you have to do is change one line of code in
node_modules/@shoutem/animation/Parallex.jsRemove line 2:
import NativeMethodsMixin from 'react/lib/NativeMethodsMixin';And edit the react-native import to this:
import { Animated, View, Dimensions, NativeMethodsMixin } from 'react-native';This resolved the issue for me.
I will file an issue at the animation github repo it uses.