hey guys! I’ve created a droplet at DigitalOcean, ...
# orm-help
c
hey guys! I’ve created a droplet at DigitalOcean, installed NodeJS and tried to start Prisma. I’ve done this with Prisma 1.9 previously, in the new project we’re using Prisma 1.12. Unfortunately, the start of the
graphql-yoga
throws errors I cannot replicate at my local machine. Maybe someone of you has an idea?
Copy code
TSError: ⨯ Unable to compile TypeScript:
src/index.ts(10,34): error TS2345: Argument of type '{ typeDefs: string; resolvers: { Query: { me(parent: any, args: any, ctx: Context, info: any): Pr...' is not assignable to parameter of type 'Props<any, any, any>'.
  Types of property 'middlewares' are incompatible.
    Type 'import("/root/office-drinks/backend/node_modules/graphql-middleware/dist/types").IMiddleware<a...' is not assignable to type 'import("/root/office-drinks/backend/node_modules/graphql-yoga/node_modules/graphql-middleware/...'.
      Type 'import("/root/office-drinks/backend/node_modules/graphql-middleware/dist/types").IMiddleware<a...' is not assignable to type 'import("/root/office-drinks/backend/node_modules/graphql-yoga/node_modules/graphql-middleware/...'.
        Type 'IMiddlewareFunction<any, any, any>' is not assignable to type 'IMiddleware<any, any, any>'.
          Type 'IMiddlewareFunction<any, any, any>' is not assignable to type 'IMiddlewareTypeMap<any, any, any>'.
            Index signature is missing in type 'IMiddlewareFunction<any, any, any>'.
Thanks in advance!
a
Sounds like a dependency version issue
c
yes, that’s what it is. I’ve solved it by moving to the
graphql-middleware
that is installed as a dependency of
graphql-yoga
. What has confused me though is, that the package.json of
graphql-yoga
and myself have specified the exact same version of
graphql-middleware
to be installed… But now it works so everything is fine 😄 thanks for your answer!
fast parrot 1