Skip to content

3 Typescript errors and final project doesn't work. #1

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

Open
RangerCoder99 opened this issue Oct 29, 2022 · 0 comments
Open

3 Typescript errors and final project doesn't work. #1

RangerCoder99 opened this issue Oct 29, 2022 · 0 comments

Comments

@RangerCoder99
Copy link

RangerCoder99 commented Oct 29, 2022

In the auth.controller.ts file I see a lot of TypeScript errors that say:
"Property 'req' does not exist on type 'Promise<{ req: NextApiRequest; res: NextApiResponse; user: null; } | { req: NextApiRequest; res: NextApiResponse; user: { ...; }; }>'."

It likely got to do with the fact that this is a Promise.

In user.service.ts another type error:
"Property 'user' does not exist on type 'Promise<{ req: NextApiRequest; res: NextApiResponse; user: null; } | { req: NextApiRequest; res: NextApiResponse; user: { ...; }; }>'."

And in user.service.ts another one:
"Type 'Partial' is not assignable to type 'UserWhereInput'.\n Types of property 'posts' are incompatible.\n Type 'PostCreateNestedManyWithoutUserInput | undefined' is not assignable to type 'PostListRelationFilter | undefined'.\n Type 'PostCreateNestedManyWithoutUserInput' has no properties in common with type 'PostListRelationFilter'."

Running the app I'm unable to go past the login screen.
Register and upload works

Also maybe it's time to update the tutorials to tRPC 10 and Next.js 13 and fix some of the mistakes in the blog posts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant