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.65k stars 452 forks source link

ReferenceError: e is not defined error occurs when running next dev --turbo #3704

Open y-hsgw opened 4 hours ago

y-hsgw commented 4 hours ago

Describe the bug

When usingnext dev --turbo with a Next.js application, the following error message appears:

ReferenceError: e is not defined
    at Module.Kind (/path/to/.next/server/chunks/ssr/node_modules_xyz.js:1376:18)
    at Kind (turbopack://[project]/node_modules/@urql/core/src/gql.ts:84:30)
    ...

The application works without issues when running the next dev command.

The code is the same as in the following link when the error occurs: https://github.com/urql-graphql/urql/blob/main/examples/with-next/app/page.tsx

Reproduction

https://github.com/urql-graphql/urql/tree/main/examples/with-next

Urql version

Validations

JoviDeCroock commented 3 hours ago

You might have to reload the turbo cache apparently when a transitive dep gets bumped, turbo starts failing.