Can't import contentful in to react native project
See original GitHub issueHi there,
I am extremely excited about using contentful for my project, but I can’t get the JS library to work in a react-native project.
I get the following error:
I have tried the following approaches:
import contentful from 'contentful';
// or
var contentful = require('contentful');
You can reproduce the bug by going to this repo and following the steps I have provided.
Help would be greatly appreciated.
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Import contentful in to react-native - node.js - Stack Overflow
Hey Khaled -- it seems contentful sdk no longer works with react native, because it uses Node modules, which are rejected by expo....
Read more >Getting started with React and Contentful
This guide to getting started with React explains how to connect a create-react-app application with Contentful's GraphQL API.
Read more >Import Contentful In To React-Native - ADocLib
Use Contentful GraphQL in your React application. The main component in your bootstrapped React application is App.js. Let's edit the included functional.
Read more >Setup Contentful and GraphQL Apollo Client in React Native
In this post, I'm going to set up Contentful (a headless CMS platform) in React Native App using GraphQL Apollo Client. I'll show...
Read more >react-contentful - npm
Start using react-contentful in your project by running `npm i react-contentful`. There are 4 other projects in the npm registry using ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Khaledgarbaya do you know how can we add TS typings/intellisense when importing from
contentful/dist/contentful.browser.min.js
?For reference, we have this workaround in the
troubleshooting section
https://github.com/contentful/contentful.js#troubleshooting