Open lilsweetcaligula opened 3 years ago
A quick workaround would be to pass a function wrapping the Seneca instance, instead of passing the Seneca instance directly:
const Seneca = require('seneca')
function my_plugin(options) {
}
const lambda = Seneca()
const tau = Seneca()
tau.use(my_plugin, { seneca: () => lambda })
// OK
I was able to track down the offending line: https://github.com/senecajs/seneca/blob/master/lib/plugin.ts#L554
Ave! I believe I have discovered a bug. When I create a plugin, use it and pass another Seneca instance as an option to the plugin, the code mysteriously crashes the stack:
My Seneca version is at
3.23.3
and it's the only dependency I have in mypackage.json
file.