Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't resolve Parallax.js #93

Closed
KazuyaHara opened this issue Nov 27, 2016 · 6 comments
Closed

can't resolve Parallax.js #93

KazuyaHara opened this issue Nov 27, 2016 · 6 comments

Comments

@KazuyaHara
Copy link

KazuyaHara commented Nov 27, 2016

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

  • OSX sierra
  • xcode 8.1
  • react-native 0.38

And error message also mentioned that

  1. clear watchman watches
  2. delete the node_modules
  3. reset packager cache

but that didn't solve this issue. Does anyone face this issue?

@tijp
Copy link

tijp commented Nov 27, 2016

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.

@ajonno
Copy link

ajonno commented Nov 27, 2016

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.

@SoHotSoup
Copy link
Contributor

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!

@SoHotSoup
Copy link
Contributor

shoutem/animation#7

@KazuyaHara
Copy link
Author

Thanks @TimIJpenga , it works!

@SoHotSoup
Copy link
Contributor

shoutem/animation#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants