Skip to content
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

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

Closed
xmlking opened this issue Apr 10, 2019 · 2 comments
Assignees
Milestone

Comments

@xmlking
Copy link

xmlking commented Apr 10, 2019

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
Copy link
Member

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

@BrunnerLivio
Copy link
Member

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

BrunnerLivio added a commit that referenced this issue Apr 22, 2019
- Lazy load optional packages #119
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants