maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
227 stars 24 forks source link

better error message with "missing instance" #102

Closed rwst closed 4 years ago

rwst commented 4 years ago

I tried with nodejs 8 and 10. I also installed the latest nvm and reinstalled. This is on OpenSuSE Leap 15. Credentials are configured.

ralf@ark:~/wikidata> wb sl Q4115189 en sandbox
/usr/local/lib/node_modules/wikibase-cli/lib/edit/edit_command.js:14
  if (!program.instance) throw new Error('missing instance')
                         ^

Error: missing instance
    at module.exports (/usr/local/lib/node_modules/wikibase-cli/lib/edit/edit_command.js:14:32)
    at Object.<anonymous> (/usr/local/lib/node_modules/wikibase-cli/bin/wb-set-label:4:36)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
maxlath commented 4 years ago

I guess the error message should give that hint

rwst commented 4 years ago

Agree. Thanks!

maxlath commented 4 years ago

the new error message in v9.2.1:

missing instance
* Wikidata: use the 'wd' executable
* other Wikibase instances:
  * set the '--instance <http://my.instance>' option
  * or set the instance in config: 'wb config instance http://my.instance'