Skip to content
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

yarn generate Throws error: NEXUS__UNKNOWN__TYPE was already defined and imported as a type, check the docs for extending types #280

Closed
fbianco32 opened this issue Sep 15, 2022 · 5 comments

Comments

@fbianco32
Copy link

When running yarn generate, after generating the prisma client, yarn throws this error and stops. Prisma and nexus version used are the default ones when creating a project via CLI, node version is 16.14.0

@li9269391
Copy link

Using 'pal c' to create a "full-stack-nextjs" project has the same problem

@simonjoom
Copy link

simonjoom commented Oct 19, 2022

I found the error too, the prisma package version of paljs is not a correct one , 3.16 for node14 should be reverted to 3.15
Just overwrite the prisma with:
yarn install prisma@3.15 @prisma/client@3.15

after the change paljs generate pass

@zakariamofaddel
Copy link

zakariamofaddel commented Oct 22, 2022

I temporarily solved this issue by following the steps I listed in another issue, hope this helps!

@AhmedElywa
Copy link
Collaborator

This issue request is in #284

@rgvillanueva28
Copy link

rgvillanueva28 commented Mar 2, 2023

Issue still exists. Project was created on CLI using the full-stack-nextjs

Executing generate will result in error:

return new Error(`${name} was already defined and imported as a type, check the docs for extending types`)
           ^
Error: NEXUS__UNKNOWN__TYPE was already defined and imported as a type, check the docs for extending types

Issue exists on the yarn generate:nexus script:

$ yarn ts-node --transpile-only src/server/nexusSchema
$ ts-node -r tsconfig-paths/register -P tsconfig-nexus.json --transpile-only src/server/nexusSchema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants