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
moleculer (https://www.npmjs.com/package/moleculer) is a microservices framework that uses a "broker" to distribute commands and events and data. When a package depends on a library that includes moleculer and transporter, the transporter module is saved to the cache of the actual package but cannot be used from moleculer. It works with v1, though.
Describe the bug
moleculer (https://www.npmjs.com/package/moleculer) is a microservices framework that uses a "broker" to distribute commands and events and data. When a package depends on a library that includes moleculer and transporter, the transporter module is saved to the cache of the actual package but cannot be used from moleculer. It works with v1, though.
To Reproduce
The repro consists of multiple files. Therefore I created this repro repo: https://github.com/jeffrson/yarn2_moleculer
Instructions are given in the Readme. Essentially you should init yarn2, run yarn and start index.js via node from a package script.
Environment if relevant (please complete the following information):
Additional context
It works with v1
This is most probably related to moleculer loading the module during runtime only when necessary:
https://github.com/moleculerjs/moleculer/blob/master/src/transporters/nats.js#L63
When moleculer and transporter are included in the app itself, ie not in a dependent library, there will be no such problem.
The text was updated successfully, but these errors were encountered: