We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In my typescript express server application, when I try to run tsc to build & compile my typescript, I get an error:
tsc
../node_modules/@types/express-serve-static-core/index.d.ts:647:18 - error TS2430: Interface 'Response<ResBody, Locals, StatusCode>' incorrectly extends interface 'ServerResponse<IncomingMessage>'. Property 'req' is optional in type 'Response<ResBody, Locals, StatusCode>' but required in type 'ServerResponse<IncomingMessage>'. 647 export interface Response< ~~~~~~~~ ../node_modules/@types/express/index.d.ts:50:29 - error TS2694: Namespace 'serveStatic' has no exported member 'RequestHandlerConstructor'. 50 var static: serveStatic.RequestHandlerConstructor<Response>;
Looking around Google, all answers say to update dependencies - but that doesn't seem to work.
MY dependencies:
"devDependencies": { "@types/cors": "^2.8.6", "@types/express": "^4.17.21", "@types/express-serve-static-core": "4.17.20", "@types/jest": "^29.x", "@types/mongodb": "^3.5.4", "@types/mongoose": "^5.7.7", "@types/node": "^20.11.19", "@types/prettier": "<2.6.0", "@types/shortid": "^0.0.29", "@types/ws": "8.5.4", "express": "^4.18.2", "jest": "^29.x", "jest-circus": "^29.x", "nodemon": "^3.0.3", "ts-jest": "^29.x", "ts-node": "^10.9.2", "typescript": "^5.3.3" }```
The text was updated successfully, but these errors were encountered:
Hi @wizhaaa! We don't include direct TS support within Express, I suggest to open an issue in https://github.com/DefinitelyTyped/DefinitelyTyped as they maintain @types/express-serve-static-core
@types/express-serve-static-core
Sorry, something went wrong.
No branches or pull requests
In my typescript express server application, when I try to run
tsc
to build & compile my typescript, I get an error:Looking around Google, all answers say to update dependencies - but that doesn't seem to work.
MY dependencies:
The text was updated successfully, but these errors were encountered: