Start server doesn't work #128
Answered
by
MichalLytek
amantiwari1
asked this question in
Q&A
-
Aman@DESKTOP-LGSE6SC MINGW64 /d/learn/graphql/2-basic
$ yarn
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > type-graphql@1.1.1" has unmet peer dependency "class-validator@>=0.12.0".
[4/4] Building fresh packages...
Done in 67.49s.
Aman@DESKTOP-LGSE6SC MINGW64 /d/learn/graphql/2-basic
$ yarn start
yarn run v1.22.10
$ ts-node --transpile-only ./index.ts
D:\learn\graphql\2-basic\node_modules\type-graphql\dist\helpers\findType.js:19
throw new errors_1.NoExplicitTypeError(prototype.constructor.name, propertyKey, parameterIndex, argName);
^
Error: Unable to infer GraphQL type from TypeScript reflection system. You need to provide explicit type for parameter #2 of 'post' of 'PostCrudResolver' class.
at Object.findType (D:\learn\graphql\2-basic\node_modules\type-graphql\dist\helpers\findType.js:19:15)
at Object.getParamInfo (D:\learn\graphql\2-basic\node_modules\type-graphql\dist\helpers\params.js:10:49)
at D:\learn\graphql\2-basic\node_modules\type-graphql\dist\decorators\Args.js:12:25
at D:\learn\graphql\2-basic\prisma\generated\type-graphql\resolvers\crud\Post\PostCrudResolver.ts:39:37
at DecorateProperty (D:\learn\graphql\2-basic\node_modules\reflect-metadata\Reflect.js:553:33)
at Object.decorate (D:\learn\graphql\2-basic\node_modules\reflect-metadata\Reflect.js:123:24)
at __decorate (D:\learn\graphql\2-basic\prisma\generated\type-graphql\resolvers\crud\Post\PostCrudResolver.ts:27:92)
at D:\learn\graphql\2-basic\prisma\generated\type-graphql\resolvers\crud\Post\PostCrudResolver.ts:26:3
at Object.<anonymous> (D:\learn\graphql\2-basic\prisma\generated\type-graphql\resolvers\crud\Post\PostCrudResolver.ts:22:1)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ yarn prisma generate
yarn run v1.22.10
$ D:\learn\graphql\2-basic\node_modules\.bin\prisma generate
Prisma schema loaded from prisma\schema.prisma
✔ Generated Prisma Client (2.26.0) to .\node_modules\@prisma\client in 374ms
✔ Generated TypeGraphQL integration to .\prisma\generated\type-graphql in 2.53s
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client import { PrismaClient } from '@prisma/client'
deleted node_module |
Beta Was this translation helpful? Give feedback.
Answered by
MichalLytek
Jul 1, 2021
Replies: 2 comments 3 replies
-
here is error
|
Beta Was this translation helpful? Give feedback.
0 replies
-
What is your environment? OS, node version, etc.? |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
amantiwari1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is your environment? OS, node version, etc.?