-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
prom-client/index has no default export #671
Comments
Yup! That is working as intended. You can see an example usage here |
Sorry @willsoto I don't get it. I did exactly what is specified in that example usage. prom-client installed with version 12.0.0, as well as your package. package.json: dependencies: {
"@willsoto/nestjs-prometheus": "^2.0.1",
"prom-client": "^12.0.0"
} AppModule.ts: import {PrometheusModule} from "@willsoto/nestjs-prometheus"
@Module({
imports: [
PrometheusModule.register({
defaultMetrics: {
enabled: true,
config: {
timeout: 5000,
includeMethod: true,
includePath: true,
},
},
})
],
providers: [],
controllers: [],
})
export class AppModule {
} This error shows up when launching NestJS. Could you be more specific about what I am missing? Thanks |
Can you confirm that |
Yes I double-checked in |
I'm not quite sure what the issue would be then...I'll have to take a look |
Do you happen to have |
I think as a workaround you can disable |
My esModuleInterop is disabled: {
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"lib": [
"ES2020"
],
"outDir": "dist",
"rootDir": "src",
"inlineSourceMap": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strict": true,
"noImplicitAny": true,
"esModuleInterop": false,
"resolveJsonModule": true,
"alwaysStrict": true
},
"include": ["./src/**/*.ts"],
"exclude": [
"node_modules",
"test",
"dist",
"**/*spec.ts"
]
} Did you reproduce the issue? |
No I didn't but I am pretty sure I know what is going on. Your tsconfig settings are incompatible with my compiled tsconfig settings - I've seen this before. Setting |
You mean For the record I do not have such a problem using https://github.com/digikare/nestjs-prom |
Yes sorry, that is what I meant. |
I've released v3.0.0 to hopefully fix this. I am no longer using |
Yes it does work with 3.0.0 and without the need for |
Hi, I just installed your package using npm and it complains:
Looking at the code:
in your
utils
does not have a default export.I checked the installed version of
prom-client
(which is 12.0.0) and indeed it only exports specific types.Could you fix that, or am I missing something?
Thanks!
The text was updated successfully, but these errors were encountered: