How to configure tsconfig.json
to use Next.js together with Nexus?
#10780
Unanswered
nikolasburk
asked this question in
Help
Replies: 2 comments 1 reply
-
How does this trigger generation of Nexus? it would run |
Beta Was this translation helpful? Give feedback.
1 reply
-
Any example available for how to use [email protected] in serverless, with NextJS, and deploying to vercel (previously known as zeit now) ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Cross-posting this issue from the
nexus
repository here: prisma-labs/graphql-framework-experiment#391I have an example that combines GraphQL Nexus with Next.js, you can find it here: https://github.com/prisma/prisma-examples/tree/prisma2/typescript/graphql-nextjs
Now, I'm trying to invoke the Nexus generation via:
Here is my
makeSchema
:So, I'd expect that the Nexus generation outputs the two files
nexus-typegen.ts
andschema.graphql
.However, when I run the command I see this error:
I was able to fix the error with the help of this SO question, I needed to adjust the
module
in thecompilerOptions
of mytsconfig.json
fromesnext
tocommonjs
to make this work.However, when starting my Next.js app again, it autommatically overrides that setting to
esnext
again:I'm wondering how I should configure my
tsconfig.json
to use both Nexus and Next.js together?Beta Was this translation helpful? Give feedback.
All reactions