[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
If you try to use the gRPC health indicator without passing in options to override the proto path, you'll end up with an error like this:
[Nest] 1327 - 06/05/2019, 6:19 PM [ExceptionHandler] ENOENT: no such file or directory, open '/workspace/node_modules/@nestjs/terminus/dist/health-indicators/microservice/protos/health.proto'
Expected behavior
You should be able to use the default health proto that comes with this package.
Minimal reproduction of the problem with instructions
// main.ts
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
await app.listen(3000);
}
bootstrap();
// app.module.ts
import { Module } from '@nestjs/common';
import { HealthModule } from './health.module';
@Module({
imports: [HealthModule],
})
export class ApplicationModule {}
curl localhost:3000/health
Yes, I know this example does not return a health indicator without having the corresponding gRPC health controller in this setup, but you'll still get the error regardless.
What is the motivation / use case for changing the behavior?
This is most likely caused by not copying the health.proto file into the dist folder when the package is published.
Environment
Nest version: X.Y.Z
For Tooling issues:
- Node version: XX
- Platform:
Others:
Thanks for reporting! Indeed, I forgot to copy the proto file into the dist folder.
Fixed by using gulp now as build task and copying proto files in @nestjs/terminus@6.3.1.
I'm submitting a...
Current behavior
If you try to use the gRPC health indicator without passing in options to override the proto path, you'll end up with an error like this:
Expected behavior
You should be able to use the default health proto that comes with this package.
Minimal reproduction of the problem with instructions
Yes, I know this example does not return a health indicator without having the corresponding gRPC health controller in this setup, but you'll still get the error regardless.
What is the motivation / use case for changing the behavior?
This is most likely caused by not copying the health.proto file into the dist folder when the package is published.
Environment