Hola. It’s been a bit since I’ve used Prisma. Runn...
# orm-help
i
Hola. It’s been a bit since I’ve used Prisma. Running into a problem with TypeScript. Anyone have a solution for:
Copy code
src/generated/prisma.ts(7272,10): error TS2416: Property 'query' in type 'Prisma' is not assignable to the same property in base type 'Prisma'.
  Type 'Query' is not assignable to type 'QueryMap'.
    Index signature is missing in type 'Query'.
src/generated/prisma.ts(7308,10): error TS2416: Property 'mutation' in type 'Prisma' is not assignable to the same property in base type 'Prisma'.
  Type 'Mutation' is not assignable to type 'QueryMap'.
    Index signature is missing in type 'Mutation'.
src/generated/prisma.ts(7374,10): error TS2416: Property 'subscription' in type 'Prisma' is not assignable to the same property in base type 'Prisma'.
  Type 'Subscription' is not assignable to type 'SubscriptionMap'.
    Index signature is missing in type 'Subscription'.
n
looks like your generatd typings is corrupt. How do you reproduce this?
i
I just ran
prisma deploy
I did fix these issues by removing the types from
Mutation
,
Query
, and
Subscription
n
How does your project look like where you run
prisma deploy
? 🙂 Can you reproduce this with any datamodel? Do you have special typescript settings in your project?
i
Nope. Everything I have is pretty standard. tsconfig:
Copy code
{
  "compilerOptions": {
    "allowJs": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "forceConsistentCasingInFileNames": true,
    "outDir": "build",
    "module": "commonjs",
    "moduleResolution": "node",
    "lib": [
      "es5",
      "es6",
      "dom",
      "es2015.core",
      "es2015.collection",
      "es2015.generator",
      "es2015.iterable",
      "es2015.promise",
      "es2015.proxy",
      "es2015.reflect",
      "es2015.symbol",
      "es2015.symbol.wellknown",
      "esnext.asynciterable"
    ],
    "target": "es6",
    "sourceMap": false,
    "noImplicitAny": false,
    "noImplicitReturns": false,
    "noImplicitThis": false,
    "noUnusedParameters": false,
    "removeComments": true
  },
  "include": [
    "src"
  ],
  "exclude": [
    "node_modules",
    "build",
    "jest",
    "scripts",
    "__tests__",
    "**/*.spec.ts"
  ]
}
n
ok 🙂 I suspect that one of those settings is not correctly supported by the
prisma
CLI or the
prisma-ts
generator for the Prisma binding.
Can you reproduce this in a fresh project without special typescript settings?
i
Hmm, let me try real quick
It’s working when I initialize a new project
n
Ok, could you change/remove the tsconfig properties one by one until it works as expected?
i
Yep, trying that now
🙌 1
Didn’t work
Ultimately, I copied/pasted the generated Prisma project’s
tsconfig
into my project’s
tsconfig
and still had the same errors
I’ll play around with it. For now, I’m just going to update the
generated/prisma.ts
file and remove types from the 3 I mentioned above
👍 1
n
this does sounds familiar though, are you on an older
prisma-binding
?
what's your version?
i
Latest on every dep
h
I'm running into this issue as well. Latest on every dep too.
I ended up downgrading everything back to where it was.