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

Contentful is no longer working with react-native 0.69.6 #1873

Open
polcats opened this issue Apr 12, 2023 · 0 comments
Open

Contentful is no longer working with react-native 0.69.6 #1873

polcats opened this issue Apr 12, 2023 · 0 comments

Comments

@polcats
Copy link

polcats commented Apr 12, 2023

Expected Behavior

Importing contentful library in a react-native app works without errors

Actual Behavior

Contentful is trying to import a Node functionality:

The package at "../../node_modules/contentful/dist/contentful.node.js" attempted to import the Node standard library module "fs".

Possible Solution

Find a workaround to avoid fs?

Steps to Reproduce

  1. Create a new react-native app
  2. Install contentful
  3. Import contentful

Context

We are working on a monorepo project that uses NextJS and react-native. The contentful library is already getting used in the NextJS app. The ideal situation is that we can also use the library in react-native with minimal changes.

Environment

  • Language Version: v18.12.1
  • Package Manager Version: 8.19.2
  • Browser Version: N/A
  • Operating System: Linux DESKTOP-80O6G0P 5.15.90.1-microsoft-standard-WSL2
  • Package Version: 9.2.17
  • Which API are you using?: Delivery
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

1 participant