-
Notifications
You must be signed in to change notification settings - Fork 367
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
Expression is not callable in 4.0.0 #236
Comments
What does your |
@EvanHahn Here it is {
"compilerOptions": {
"paths": {
"@modules/*": ["./src/modules/*"],
"@database/*": ["./src/database/*"],
"@common/*": ["./src/common/*"],
"@utils/*": ["./src/utils/*"]
},
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es2017",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true
}
} |
Would you be willing to enable |
Hi @marluanespiritusanto My upgrading experience was smooth. I just upgraded to helmet 4.0.0, the code is at https://github.com/Hongbo-Miao/hongbomiao.com/blob/master/server/src/security/middlewares/helmet.middleware.ts I am using |
I'm facing the same issue, and unfortunately {
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2017",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./src",
"incremental": true,
"strict": true,
"esModuleInterop": true,
},
"exclude": ["node_modules", "dist"]
} |
I was able to resolve this by ignoring typescript errors before using import * as helmet from 'helmet'
...
// @ts-ignore
app.use(helmet(helmetConfig)) I believe this is because the default |
I'd like to fix the Helmet types. Helmet is a CommonJS module (in other words, it uses import helmet = require("helmet"); Though I'm not an expert at how TypeScript modules work. |
This issue looks the same as #235, so I'm going to close this issue and move discussion there. |
After updating to 4.0.0 version the helmet middleware configuration throws an error:
This is the code Im trying to run:
The text was updated successfully, but these errors were encountered: