question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

prisma/generated/type-graphql/resolvers/inputs/UserUpdateManyMutationInput.ts:3:21 - error TS2305: Module '"../../../../../node_modules/@prisma/client"' has no exported member 'InputJsonValue'.

See original GitHub issue

Upgraded the Prisma to version 2.15, ran the command npx tsc and the below error occured

Bug description

@prisma/client"’ has no exported member 'InputJsonValue.

Prisma information

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  binaryTargets = ["native", "debian-openssl-1.1.x"]
  provider      = "prisma-client-js"
}

generator typegraphql {
  provider = "typegraphql-prisma"
  output   = "../prisma/generated/type-graphql"
}

model User {
  id               String            @id @default(cuid())
  email            String            @unique
  name             String?
  profilePic       String?
  commitments      Commitment[]
  updates          Update[]
  comments         Comment[]
  commentReactions CommentReaction[]
  updateReactions  UpdateReaction[]
  notifications    Notifications[]   @relation("target-user")
  reached          Notifications[]   @relation("notified-user")
}

Environment & setup

  • OS: Mac OS
  • Database: Postgres
  • Node.js version: 14.15.4
  • Prisma version: 2.15
@prisma/cli          : 2.14.0
@prisma/client       : 2.15.0
Current platform     : darwin
Query Engine         : query-engine 5d491261d382a2a5ffdc71de17072b0e409f1cc1 (at ../../../.config/yarn/global/node_modules/@prisma/engines/query-engine-darwin)
Migration Engine     : migration-engine-cli 5d491261d382a2a5ffdc71de17072b0e409f1cc1 (at ../../../.config/yarn/global/node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core 5d491261d382a2a5ffdc71de17072b0e409f1cc1 (at ../../../.config/yarn/global/node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary        : prisma-fmt 5d491261d382a2a5ffdc71de17072b0e409f1cc1 (at ../../../.config/yarn/global/node_modules/@prisma/engines/prisma-fmt-darwin)
Studio               : 0.332.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
AmreeshTyagicommented, Mar 23, 2021

Simply replaced import type { InputJsonValue, JsonValue, Prisma } from '@prisma/client'; with import type { Prisma } from '@prisma/client';

and using Prisma.InputJsonValue everywhere in my code. Resolved.

1reaction
peverscommented, Feb 19, 2021

This is caused by a bug regarding the relation name containing dashes. Related issue: https://github.com/prisma/prisma/issues/3193

Prisma will generate invalid JS if your constraint contains characters that are invalid JS properties (like dash or a dot).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing enum from @prisma/client gives the error "Module ...
ts:4:10 - error TS2305: Module '"@prisma/client"' has no exported member 'Modality'. I'm able to import PrismaClient and use it just fine in my ......
Read more >
ERROR: Namespace 'dayjs' has no exported member ... - Reddit
I cannot see to get my head around this error. I want to incorporate a 3rd party datepicker into my project, which is...
Read more >
angular/angular-cli - Gitter
@cybercyst Angular CLI is based on the Ember CLI so you should be able to add blue ... for Protractor: Module 'webdriver' has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found