You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package require-optional can be used as a dropin-replacement and resolves this issue, as it requires relative to the __filename the require was called.
Feature Request
Is your feature request related to a problem? Please describe.
The package
optional
requires packages relative to its own location, which may result in errors, if the application has a structure like this:Here,
@nestjs/websockets
won't be loaded, as it cannot be found byoptional
. Hence, nestjs won't initialize web-socket.Some issues are also filed: #2213, #1149
Describe the solution you'd like
The package
require-optional
can be used as a dropin-replacement and resolves this issue, as it requires relative to the__filename
the require was called.Teachability, Documentation, Adoption, Migration Strategy
This can be used as a dropin replacement and shouldn't required special training.
What is the motivation / use case for changing the behavior?
Resolving filed issues and others...
The text was updated successfully, but these errors were encountered: