Skip to content

Many properties do not exist on 'fastifyPassport' imported from '@fastify/passport' #1319

@schmidtvl

Description

@schmidtvl

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

Node version: v23.11.0
Typescript version: v5.7.3
Fastify version: v5.2.1
Fastify/passport version: v3.0.2
Module type: ESM

I was following the example documentation to get my application set up but I'm running into Typescript errors. It's failing to find basically any property that is supposed to be available on the fastifyPassport module imported from @fastify/passport.

Image

If I compare what is being imported from @fastify/passport to what is being imported from @fastify/secure-session, it seems like the passport module might be missing defining a namespace for fastifyPassport?

fastifySecureSession:
Image
Image

fastifyPassport:
Image

Am I missing something in my setup or is there further work required on the module to export the properties?

This is my tsconfig.json:

{
  "compilerOptions": {
    "baseUrl": "./src",
    "module": "NodeNext",
    "target": "ES2022",
    "moduleResolution": "NodeNext",
    "strict": true,
    "declaration": true,
    "outDir": "./dist",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
  },
  "include": ["./src/**/*.ts"],
  "ts-node": {
    "esm": true,
    "transpileOnly": true,
    "logError": true,
  }
}

Note: I tried the solution from this issue but it did not resolve my problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions