Closed mandymozart closed 1 week ago
Hi,
Most probably you have correct graphql versions, but it is being transpiled differently by keystone and nextjs (code for check)
Try modifying your next.config.js
like below (experimental.serverComponentsExternalPackages
):
https://github.com/keystonejs/keystone/blob/main/examples/framework-nextjs-app-directory/next.config.mjs
I was trying to build a standalone version of examples/framework-nextjs-app-directory. I locked the graphql version to 16.8.1 which solved some dependencies issues as well as stopped using yarn, which made the prisma client basically uncontrolleable ending up in various locations inside the node_modules folder.
I got the project running again but am still not able to access context via getContext as described in the example.
This is my package.json
My context.ts
NODE VERSION
v18.19.1
Any help appreciated how to detect where and why there is two versions of GRAPHQL used.
I was using 'syncpack' to see if there is any duplicates, and manually, but I can not see any.
Switching to PNPM caused more problems than it solved for this nextjs, keystone mutant ;)