paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
687 stars 55 forks source link

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

Closed fbianco32 closed 1 year ago

fbianco32 commented 2 years ago

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 commented 2 years ago

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

simonjoom commented 1 year ago

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 commented 1 year ago

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

AhmedElywa commented 1 year ago

This issue request is in #284

rgvillanueva28 commented 1 year ago

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