Good night!
I was starting at authentication on nestjs on the official site https://docs.nestjs.com/techniques/authentication and after i build it, the following type error appear:
node_modules/@types/passport/index.d.ts(77,64): error TS2344: Type 'Request
Type 'Request
node_modules/@types/passport/index.d.ts(79,66): error TS2344: Type 'Request
node_modules/@types/passport/node_modules/@types/express/index.d.ts(90,90): error TS2315: Type 'ErrorRequestHandler' is not generic.
node_modules/@types/passport/node_modules/@types/express/index.d.ts(99,78): error TS2315: Type 'Request' is not generic.
node_modules/@types/passport/node_modules/@types/express/index.d.ts(100,85): error TS2315: Type 'RequestHandler' is not generic
passport: 0.4.0
@types/passport: 1.0.2
Removing the passport types (@types/passport: 1.0.2) fixed it for me.
Removing all the passport types the official site tells to install seems to work:
yarn remove @types/passport-local @types/passport-jwt
Those files are not in the example code package.json.
Most helpful comment
Removing all the passport types the official site tells to install seems to work:
yarn remove @types/passport-local @types/passport-jwtThose files are not in the example code package.json.