-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Invalid npm package dependencies #233
Comments
I tried it out myself and it works with a clean setup:
I have added 1:1 your code and received the following result, which is expected at the current state of 6.3.x: {
"status": "error",
"error": {
"rss": {
"status": "up"
},
"heap": {
"status": "up"
},
"storage": {
"status": "up"
},
"google": {
"status": "up"
},
"database": {
"status": "down",
"message": "Connection provider not found in application context"
}
},
"details": {
"rss": {
"status": "up"
},
"heap": {
"status": "up"
},
"storage": {
"status": "up"
},
"google": {
"status": "up"
},
"database": {
"status": "down",
"message": "Connection provider not found in application context"
}
}
} Could you share a minimal reproduction of your repo? |
@BrunnerLivio are you using typescript? |
@konraddysput yes
|
You have right - I started project from the beginning like you did and I found what was a problem. My tsconfig:
Do you see anything wrong here? |
OK, I see a problem is with two typescript flags:
@BrunnerLivio do you know why I cannot use them with your library? Actually I need to use them in my code. |
@konraddysput sorry for the late reply. I was able to reproduce your error. I worked around this problem by using my custom types. This is not sustainable, so I will create a PR to the library itself to support the typings in strict mode. You can follow the discussion here: Alex-D/check-disk-space#3 If you want to workaround this in your project, you have to set the setting in your {
"compilerOptions": {
"paths": { "*": ["types/*"] }
}
} and add the types folder with mkdir types
cat <<EOT >> types/check-disk-space.d.ts
import { totalmem } from 'os';
export = index;
declare function index(
directoryPath: string,
): Promise<{ free: number; size: number }>;
declare namespace index {
class InvalidPathError {
constructor(message: any);
name: any;
message: any;
}
class NoMatchError {
constructor(message: any);
name: any;
message: any;
}
function getFirstExistingParentPath(directoryPath: any): any;
}
EOT |
Thanks @BrunnerLivio :) I will wait for new version then. |
Hey @BrunnerLivio Today I had a chance to update package add check if types works with strict mode. Unfortunately, TypeScript still complain about missing types. I had a chance to add Thanks! |
I think it would make sense if you would use {
"compilerOptions": {
"skipLibCheck": true
...
}
} |
Screw |
I'm submitting a...
Current behavior
When I download latest version of libraries via npm:
and I'm trying to use healtchecks like below:
I'm receiving build errors. Please check image below:
I tried to install manually packages, but it still doesn't work.
Expected behavior
After
$ npm install --save @nestjs/terminus @godaddy/terminus
I expect to have every needed dependency, or detailed instruction what I should do if I want to use providers from official doc:https://docs.nestjs.com/recipes/terminus
Minimal reproduction of the problem with instructions
Environment
"@godaddy/terminus": "^4.1.2",
"@nestjs/terminus": "^6.3.1",
NodeJS: v10.16.0
Windows 10
The text was updated successfully, but these errors were encountered: