ssb-server
ssb-server copied to clipboard
TypeError: Cannot set property 'module' of undefined
Getting the following when attempting to instlal plugins on V19.2.0:
$ sbot plugins.install ssb-backlinks
/home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/muxrpcli/index.js:125
throw err
^
TypeError: Cannot set property 'module' of undefined
at Object.install (/home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/ssb-plugins/index.js:117:23)
at Object.hooked (/home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/hoox/index.js:10:15)
at Object.localCall (/home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/muxrpc/local-api.js:31:29)
at Object.<anonymous> (/home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/muxrpc/local-api.js:37:22)
at PacketStreamSubstream.stream.read (/home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/muxrpc/stream.js:69:23)
at PacketStream._onstream (/home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/packet-stream/index.js:228:11)
at PacketStream.write (/home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/packet-stream/index.js:135:41)
at /home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:56:15
at /home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/pull-stream/sinks/drain.js:24:37
at /home/nolan/.node_modules/lib/node_modules/ssb-server/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
It appears that ssb-plugins
is expecting an "options" object here:
install: function (opts, _opts) {
var pluginName
if(isString(opts)) {
pluginName = opts
opts = _opts
opts.module = pluginName
}
I found that installing a plugin with {}
after it does not through the error:
$ ssb-server plugins.install ssb-about {}
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
I'd guess it's still relevant. The {} as command line argument syntax is a bit odd. Maybe there's a scenario where passing options on the installation command line is needed, but I think the default empty case should be handled silently.
@ndarilek try using the --name
flag. ssb-server plugins.install --name ssb-about
see also: https://github.com/ssbc/ssb-server/issues/749 https://github.com/ssbc/ssb-server/issues/718
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?