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

next-urql withUrqlClient causing error in v2.1.0 #1101

Closed mosesintech closed 4 years ago

mosesintech commented 4 years ago

urql version & exchanges: urql: v1.10.1 next-urql: v2.1.0

Steps to reproduce

  1. Install urql, next-urql, and peer dependancies.
  2. Import withUrqlClient in Next.js page (example: /src/pages/login.js).
  3. Error.

Expected behavior Expect to be able to use withUrqlClient without issues.

Actual behavior Import withUrqlClient causes an issue, without even using it.

Failed to Compile:

Screen Shot 2020-10-29 at 9 38 04 AM

Error in Terminal:

Screen Shot 2020-10-29 at 9 41 34 AM

NOTE: There is no issue with next-urql v2.0.0, but only with v2.1.0.

My dependencies:


"dependencies": {
    "bcryptjs": "^2.4.3",
    "connect-session-knex": "^2.0.0",
    "express": "^4.17.1",
    "express-graphql": "^0.11.0",
    "express-session": "^1.17.1",
    "graphql": "^15.3.0",
    "graphql-iso-date": "^3.6.1",
    "js-cookie": "^2.2.1",
    "knex": "^0.21.6",
    "next": "9.5.5",
    "next-urql": "^2.1.0",
    "pg": "^8.4.1",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-is": "^17.0.1",
    "sass": "^1.27.0",
    "urql": "^1.10.1"
  }`
``
kitten commented 4 years ago

Hiya we've just noticed this issue too. This was related to an invalid build. If you upgrade to next-urql@2.1.1 you'll find that it has been fixed ✌️

mosesintech commented 4 years ago

Thank you! ^-^