how to run '@apollo/client in expo'

Viewed 197

I had a bare react native and then I converted the project to an expo project because the project wasn't running with the main react native project. so after creating the expo project, i tried to run the project and it gave me this error:

While trying to resolve module `@apollo/client` from file `C:\Users\REO\Desktop\food-recipe\App.js`, the package `C:\Users\REO\Desktop\food-recipe\node_modules\@apollo\client\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`C:\Users\REO\Desktop\food-recipe\node_modules\@apollo\client\main.cjs`. Indeed, none of these files exist:

  * C:\Users\REO\Desktop\food-recipe\node_modules\@apollo\client\main.cjs(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
  * C:\Users\REO\Desktop\food-recipe\node_modules\@apollo\client\main.cjs\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

I've tried downgrading the Apollo package as suggested in a different stack overflow post, bu nothing seems to work.

You can download the file here and check it out

0 Answers
Related