-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Multiple TypeScript errors when using @apollo/client #9428
Comments
I've got similar error when running tsc 4.6.2 with my nextjs project using apollo-server. I tried older versions of typescript but this did not help. |
I had two different versions of @apollo/query-planner (something yarn does but npm not). Resolving this solved the issue. |
Hi all 👋🏻 thanks for your patience! Looking at the stack trace it appears that this is due to having multiple versions of the same library in your project. @danielkbx's response appears to corroborate this. I'll close this issue but please do feel free to let us know if you feel that there's something actionable here for the team to address 🙏🏻 |
Intended outcome:
Use Apollo Client with NextJS in NestJS to query Apollo via ApolloProvider and
useQuery
Actual outcome:
Compiles into multiple errors and doesn't start the website
and the console returns the following:
How to reproduce the issue:
I don't have something special that might cause that, I just used and the error occoured in NextJS.
Maybe it's a tsconfig issue?
Versions
System:
OS: Windows 10 10.0.22000
Binaries:
Node: 16.13.2 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
Yarn: 1.22.17 - ~\scoop\apps\yarn\current\bin\yarn.CMD
npm: 8.1.2 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22000.120.0), Chromium (98.0.1108.50)
npmPackages:
@apollo/client: ^3.5.8 => 3.5.8
@apollo/gateway: ^0.46.0 => 0.46.0
apollo-server-express: ^3.6.2 => 3.6.2
The text was updated successfully, but these errors were encountered: