-
Notifications
You must be signed in to change notification settings - Fork 275
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
Suport Prisma 4.0.0, Error running version nexus: 1.3.0 Error: NEXUS__UNKNOWN__TYPE was already defined and imported as a type #1119
Comments
Hey @reaink , can I please ask what's your current prisma version? |
current version
update to prisma v4.x throw error |
I'm having the same error. Downgrading to v3.15.2 didn't fix it. Its still working on a previous project with this prisma version tho. Might be related to something else? It doesn't even generate the outputs for typegen and schema. |
@kevscript Yes, I hope Prisma 4.x can be supported, currently I'm still using prisma 3.x in current nexus version |
I'am having the same issue upgrading
|
Fix this by edit builder.js 156 change Three backend in production @ "nexus": "^1.3.0", with "prisma": "^4.1.1", |
|
Having the same issue since updating to prisma v4 |
Same issue |
Have you tried my solution to remove the throw statement in the builder? Had the same issue after upgrading from 3.1x to 4.x
I got some new errors by Nexus without the throw but this time with the type the error occured.
Holen Sie sich Outlook für Android<https://aka.ms/AAb9ysg>
…________________________________
From: Sava-Danylo Sakhro ***@***.***>
Sent: Wednesday, October 12, 2022 11:49:46 PM
To: graphql-nexus/nexus ***@***.***>
Cc: Björnstjerne Tiedemann ***@***.***>; Comment ***@***.***>
Subject: Re: [graphql-nexus/nexus] Suport Prisma 4.0.0, Error running version nexus: 1.3.0 Error: NEXUS__UNKNOWN__TYPE was already defined and imported as a type (Issue #1119)
Same issue
—
Reply to this email directly, view it on GitHub<#1119 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADMGAE7HQIFFY3A2H45LICTWC4W7VANCNFSM53Z7VNVQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I don't think this is a prisma 4 specific error. I'm getting it any time I have more than 2 missing type definitions in my nexus schema: To reproduce, create a field on an object of Add a second field for 'NotAType2' and you'll get this error back instead and nothing about either NotAType1 or NotAType2:
|
If you want, you can add detail to the error message by adding a log statement in
Might help you find the actual error |
please refer to here for the fix to this problem. |
I'm getting this same error, I used the method here to identify what was causing the issue, and for me one of them was the DateTime type in Prisma. |
@SysSU I'm also getting this error with DateTime type. Did you manage to fix it? |
@markymc it has been some time since I looked at this code but I think the following fixed it for me. import { makeSchema } from 'nexus';
import {
Json as jsonScalar,
// Import DateTime scalar
DateTime as dateTimeScalar,
} from 'nexus-prisma/scalars';
import * as types from './types';
export default makeSchema({
// Add dateTimeScalar to types when calling makeSchema.
types: { ...types, jsonScalar, dateTimeScalar },
}); |
@SysSU Thanks! That did it! |
running nexus v1.3.0, prisma v4.0.0 Error:
Error: NEXUS__UNKNOWN__TYPE was already defined and imported as a type, check the docs for extending types
The text was updated successfully, but these errors were encountered: