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

Expo and Contentful #191

Closed
crivera opened this issue Oct 18, 2017 · 3 comments
Closed

Expo and Contentful #191

crivera opened this issue Oct 18, 2017 · 3 comments
Assignees

Comments

@crivera
Copy link

crivera commented Oct 18, 2017

Hi

i was playing around with contentful and tried to run it in combination with expo.io.

This seemed to work before version 5.0.1 without issues but now when I update and just run the app i get the following error:

screen shot 2017-10-18 at 11 51 47 am

it seems like its trying to require the http module which doesnt exist in react native.

Any help would be great
Chris

@axe312ger
Copy link
Collaborator

Hey there,

when http is not available, you may try the browser version of the library.

const { createClient } = require('contentful/dist/contentful.browser.min.js')

Let me know if that helped, I will add it to the readme then,
Benedikt

@crivera
Copy link
Author

crivera commented Oct 18, 2017

that worked! thanks!

@crivera crivera closed this as completed Oct 18, 2017
@psadanowicz
Copy link

@axe312ger I had same issue but your solution worked. Please add this information to readme. Thanks a lot.

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

3 participants