-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
5.0.0
Plugin version
3.0.1
Node.js version
20.17.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
UX425QA.306
Description
I have a typescript compilation error in the typing module.
When I run ‘tsc --noEmit’, I get this error:
node_modules/@fastify/passport/dist/session-managers/SecureSessionManager.d.ts:4:38 - error TS2307: Cannot find module '@fastify/session' or its corresponding type declarations.
4 import { FastifySessionObject } from '@fastify/session';
~~~~~~~~~~~~~~~~~~
Found 1 error in node_modules/@fastify/passport/dist/session-managers/SecureSessionManager.d.ts:4
And all my dependencies from package.json:
"@fastify/cors": "^10.0.1",
"@fastify/helmet": "^12.0.1",
"@fastify/passport": "^3.0.1",
"@fastify/rate-limit": "^10.1.1",
"@fastify/secure-session": "^8.1.0",
"@fastify/swagger": "^9.1.0",
"@fastify/swagger-ui": "^5.0.1",
"@prisma/client": "^5.20.0",
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"bcrypt": "^5.1.1",
"dotenv": "^16.4.5",
"fastify": "^5.0.0",
"handlebars": "^4.7.8",
"json-schema-to-ts": "^3.1.1",
"jsonwebtoken": "^9.0.2",
"nodemailer": "^6.9.15",
"passport-local": "^1.0.0"
},
"devDependencies": {
"@types/bcrypt": "^5.0.2",
"@types/cors": "^2.8.17",
"@types/jsonwebtoken": "^9.0.7",
"@types/node": "^22.5.5",
"@types/nodemailer": "^6.4.16",
"@types/passport": "^1.0.16",
"@types/passport-local": "^1.0.38",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-unused-imports": "^4.1.4",
"husky": "^9.1.6",
"prettier": "^3.3.3",
"prisma": "^5.20.0",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.6.0",
"typescript-eslint": "^8.8.0"
}
tsconfig.json:
{
"extends": "./tsconfig.base.json",
"ts-node": {
"transpileOnly": true,
"require": ["tsconfig-paths/register"]
},
"include": ["app/**/*.ts"],
"exclude": ["dist", "node_modules"]
}
tsconfig.base.json:
{
"compilerOptions": {
"lib": ["ESNext"],
"moduleResolution": "node",
"noUnusedLocals": true,
"noUnusedParameters": true,
"removeComments": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"sourceMap": true,
"target": "ES2020",
"esModuleInterop": true,
"outDir": "./dist",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"types": ["node"],
"typeRoots": ["./node_modules/@types", "./app/src/entities"],
"baseUrl": "./app/src",
"paths": {
"@fonts": ["assets/fonts/*"],
"@icons": ["assets/icons/*"],
"@images": ["assets/images/*"],
"@config/*": ["config/*"],
"@entities/*": ["entities/*"],
"@enums/*": ["enums/*"],
"@libs/*": ["libs/*"],
"@middlewares/*": ["middlewares/*"],
"@repositories/*": ["repositories/*"],
"@routes/*": ["routes/*"],
"@services/*": ["services/*"],
"@templates": ["templates/*"],
"@utils": ["libs/utils/index.ts"]
},
"strictNullChecks": true
}
}
Don't hesitate if you see any inconsistencies in these files too !
Link to code that reproduces the bug
No response
Expected Behavior
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels