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

React Native Support #109

Open
rangerscience opened this issue Oct 31, 2017 · 6 comments
Open

React Native Support #109

rangerscience opened this issue Oct 31, 2017 · 6 comments

Comments

@rangerscience
Copy link

Are there any plans for React Native support? It appears the blocker is that Resemble depends on Canvas which depends on fs, which isn't present (AFAIK?) in the react native environment.

@wswebcreation
Copy link

Hi @rangerscience

Do you mean the node library fs? If so then it is available. And what do you mean with ReactNative support? If you are able to create a screenshot of your device you can compare it? Or am I missing something?

@rangerscience
Copy link
Author

Here's a snippet of the error as reported by Expo:

{
  "from" : "..../node_modules/canvas/lib/canvas.js",
  "message": "Unable to resolve module 'fs' from '.../canvas/js': Module does not exist in the module map"
}

From what I can tell googling around, although fs does exist in the normal Node environment, it's not available on devices - which is what I mean by React Native support.

PS - Thanks for the response! I'm poking around a bit more, have some new ideas...

@wswebcreation
Copy link

@rangerscience

Still, I never heard of it being installed on devices.

I don't want to promote my own module here, but it also uses resemblejs (only a modified version of it) and it compares images of mobile devices (hybrid app / mobile browser) but the idea is the same for ReactNative, see the docs here

@rangerscience
Copy link
Author

rangerscience commented Oct 31, 2017

Thanks, but the dependency on Appium sounds complicated. I might just try to roll my own bitwise comparison, or see about replacing the Canvas dependency here with React-Canvas.

@jamescryer
Copy link
Member

Not my area of expertise. I'll keep the ticket open and mark as a feature request. Happy to review any Pull-Requests.

@hoyoooo
Copy link

hoyoooo commented Jan 11, 2019

I have the same issue, I think resemble is not compatible with react-native.
when I only add the line of import resemble I got the following message "can't find variable Image".

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

No branches or pull requests

4 participants