Skip to content
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

Project does not compile #2

Open
sticklerdev opened this issue Nov 21, 2020 · 7 comments
Open

Project does not compile #2

sticklerdev opened this issue Nov 21, 2020 · 7 comments

Comments

@sticklerdev
Copy link

I just cloned this project and tried to compile using the tsc task in the package.json file. Here are a couple of problems that I saw and tried to resolve:

  1. The import statement in Server.ts is trying to load a file from src

import {Inject} from "@tsed/di/src";

Loading it from @tsed/di fixed this compilation problem.

  1. There are several errors in PassportCtrl.ts class in functions that are trying to return req.user. TS compiler reports errors - Property 'user' does not exist on type 'Req' - for all the functions. Not sure how to fix this problem as I don't know enough about this framework.

This functionality that TSED library provides was exactly what I was looking for for a new project I am about to start. Would appreciate if someone could guide me as to how to fix this issue. BTW, TSED documentation on auth has same example so apparently anyone trying to follow the documentation will run into the same issues as I did when I tried to use this sample project.

@Romakita
Copy link
Collaborator

Hello @sticklerdev
I fixed the example :) Sorry for the delay.

I'll work tomorrow on the documentation.

See you
Romain

@sticklerdev
Copy link
Author

Your help and quick response is much appreciated and thanks again for the great work you are doing!!

@linuxuser07
Copy link

So I downloaded the project and I'm getting the same errors as @sticklerdev is there a specific download that I need to get?

@Romakita
Copy link
Collaborator

@linuxuser07 The better option is to create a project with the CLI, then choose the Passport option, and copy the wanted Protocol from this example. Examples are not maintained but the CI update dependencies (this is why the examples are broken).

@linuxuser07
Copy link

@Romakita ok perfect I'll do that, thank you.

@Romakita
Copy link
Collaborator

@linuxuser07 I pushed the fixed example on master. I realize this example is really old ^^.
Now it should run and build. But not sure if all endpoints works as expected.

See you
romain

@linuxuser07
Copy link

@Romakita Thank you so much for your time and fixing it I really appreciate it

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

3 participants