urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.6k stars 448 forks source link

Unable to resolve "@urql/core" from "node_modules/urql/dist/urql.es.js" #3313

Closed robertherber closed 1 year ago

robertherber commented 1 year ago

Describe the bug

I'm using the latest version of Expo (49.0.3), and everything works fine on iOS/Android but I run into this strange error when running on web:

Unable to resolve "@urql/core" from "node_modules/urql/dist/urql.es.js"

Indeed the file does not exist, and I cannot quite figure out why it would look for a file at this path, but I suspect it has to do with esModule handling at some level.

It works fine with Expo 48 - so it's most probably some default configuration that has changed between Expo 48 and 49 that is not handled gracefully - hard to say if it's an issue in Expo or Urql without further investigation.

Any ideas? Has anyone run into the same error (with or without Expo)?

Reproduction

https://github.com/robertherber/urql-expo49-repro/commit/59656e0e8a59b3234635021b3e15a4ef448d1d2c

Urql version

4.0.4

Validations

robertherber commented 1 year ago

It's an Expo configuration issue - and a workaround can be found here: https://github.com/expo/expo/issues/23322