ssb-server
ssb-server copied to clipboard
Error: plugin at:ssb-foo expected name:ssb-foo but had:foo
Currently happening with all plugins installed with ssb-server plugins.install
.
ssb-server 15.0.1 /home/christianbundy/.ssb logging.level:notice
my key ID: +oaWWDs8g73EZFUMfW37R/ULtFEjwKN/DczvdYihjbU=.ed25519
/home/christianbundy/.config/yarn/global/node_modules/ssb-plugins/load-user-plugins.js:54
throw new Error('plugin at:'+module_name+' expected name:'+name+' but had:'+(plugin||{}).name)
^
Error: plugin at:ssb-identities expected name:ssb-identities but had:identities
at module.exports (/home/christianbundy/.config/yarn/global/node_modules/ssb-plugins/load-user-plugins.js:54:15)
at Object.module.exports.loadUserPlugins (/home/christianbundy/.config/yarn/global/node_modules/ssb-plugins/index.js:240:55)
at Object.<anonymous> (/home/christianbundy/.config/yarn/global/node_modules/ssb-server/bin.js:65:26)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
Workaround is editing ~/.ssb/config
to hardcode { name: 'foo' }
manually.
cc: @dominictarr am I doing something wrong here? For example, ssb-server plugins.install ssb-identities
sets the config as:
{
"plugins": {
"ssb-identities": {
"name": "ssb-identities"
}
}
}
which throws the above error. The fix is to manually change this to:
{
"plugins": {
"ssb-identities": {
"name": "identities"
}
}
}
Looks like this regression may have been made in https://github.com/ssbc/ssb-plugins/commit/7ee651a5fc48fe588ab24b5abe45dd013591e102, maybe we should be require()
ing the plugin to get the real plugin.name
? Or maybe we could circumvent the problem by just using true
unless it came from the filesystem.
Oh, I see, I have to specify the plugin name on the command line.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?