Closed Diluka closed 4 years ago
These dependencies are declared as optionalDependenices
. As recommended in the Installation, we recommend using the --no-optional
install option. Is that flexibility good enough?
➜ npm i @nestjs/terminus && tree -L 1 node_modules
node_modules
├── check-disk-space
├── d
├── es5-ext
├── es6-iterator
├── es6-symbol
├── ext
├── @nestjs
├── next-tick
└── type
Though, thanks to your issue, I've found that check-disk-space
-package is actually a direct dependency, even though it should be optional too. Will fix that asap.
My suggestion is remove all the optionalDependenices
and make a list of what feature need what libs. And this instrument should also be here.
It needs to keep --no-optional
in every npm install
commands. It not good enough.
Like @nestjs/platform-express
and @nestjs/platform-fastify
they are not optionalDependenices
to @nestjs/core
@Diluka Sorry for the late reply.
So there are two options to approach this:
@nestjs/terminus-disk
or @nestjs/terminus-microservices
package)optionalDependencies
and lazy load the required dependencies instead. This could cause issues with webpack, but better developer experience.@kamilmysliwiec how did you approach this regarding webpack? Any insights?
@BrunnerLivio one or more libs i use don't support webpack
Resolved in 7.0.0 :tada:
I'm submitting a...
Current behavior
install all the packages
Expected behavior
do not install the packages I don't need
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment