nestjs / terminus

Terminus module for Nest framework (node.js) :robot:
https://nestjs.com/
MIT License
677 stars 99 forks source link

build throwing errors when dependencies are installed with `yarn --ignore-optional` #119

Closed xmlking closed 5 years ago

xmlking commented 5 years ago

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

I installed dependencies with --ignore-optional for CI Builds yarn --no-cache --ignore-optional --frozen-lockfile

When try to build got following errors.

ERROR in /Developer/Work/SPA/ngx-starter-kit/node_modules/@nestjs/terminus/dist/health-indicators/database/database-health-indicator.d.ts
ERROR in /Developer/Work/SPA/ngx-starter-kit/node_modules/@nestjs/terminus/dist/health-indicators/database/database-health-indicator.d.ts(1,50):
TS2307: Cannot find module 'mongoose'.

ERROR in /Developer/Work/SPA/ngx-starter-kit/node_modules/@nestjs/terminus/dist/health-indicators/database/mongoose.health.d.ts
ERROR in /Developer/Work/SPA/ngx-starter-kit/node_modules/@nestjs/terminus/dist/health-indicators/database/mongoose.health.d.ts(1,28):
TS2307: Cannot find module 'mongoose'.

ERROR in /Developer/Work/SPA/ngx-starter-kit/node_modules/@nestjs/terminus/dist/health-indicators/databse-ping-check-settings.interface.d.ts
ERROR in /Developer/Work/SPA/ngx-starter-kit/node_modules/@nestjs/terminus/dist/health-indicators/databse-ping-check-settings.interface.d.ts(4,50):
TS2307: Cannot find module 'mongoose'.

ERROR in /Developer/Work/SPA/ngx-starter-kit/node_modules/@nestjs/terminus/dist/health-indicators/microservice/microservice.health.d.ts
ERROR in /Developer/Work/SPA/ngx-starter-kit/node_modules/@nestjs/terminus/dist/health-indicators/microservice/microservice.health.d.ts(3,31):
TS2307: Cannot find module '@nestjs/microservices'.

Expected behavior

since I don't have explicit dependency on mongoose and @nestjs/microservices, I shouldn't be forced to install those dependencies don't have similar issues with other nestjs modules

Minimal reproduction of the problem with instructions

https://github.com/xmlking/ngx-starter-kit

What is the motivation / use case for changing the behavior?

i am trying to speedup npm install process for CI docker builds by using --ignore-optional flag

Environment


Nest version: X.Y.Z


For Tooling issues:
- Node version: XX  
- Platform:  

Others:

BrunnerLivio commented 5 years ago

Thanks for reporting. I am able to reproduce the error, looking into it!

BrunnerLivio commented 5 years ago

Fixed with #138 - to be released in 6.1.1 asap :)