Closed almereyda closed 6 years ago
the problem is that the ./bin/wikidata-cli
implementation was failing: the script was attempting to refer to a relative file from the project root but won't work when not in the project folder...
So I removed ./bin/wikidata-cli
(d0df064), and the only alternative I can think of is to suggest you to add an alias:
alias wikdata-cli="/home/ya/.nvm/versions/node/v8.9.4/bin/wd"
I guess https://github.com/maxlath/wikidata-cli/commit/d0df0648692adbc16de118c8d15dea14eef3f9ca was not as complete as neccessary.
$ npm i -g wikidata-cli
/home/ya/.nvm/versions/node/v8.9.3/bin/wd -> /home/ya/.nvm/versions/node/v8.9.3/lib/node_modules/wikidata-cli/bin/wd
npm ERR! path /home/ya/.nvm/versions/node/v8.9.3/lib/node_modules/wikidata-cli/bin/wikidata-cli
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/ya/.nvm/versions/node/v8.9.3/lib/node_modules/wikidata-cli/bin/wikidata-cli'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ya/.npm/_logs/2018-01-16T22_04_04_116Z-debug.log
I also think this alias would be the first in the world to actually extend a command string, and make it artificially longer, instead of shortening it ;)
Sorry for having caused this with #42 in the first place.
I made a patch 224c7e9 and published it as v6.0.4
I'm happy with wd
so far. A working PR may be provided in the future independently.
After the thankful implementation of #42, this still does not work with a fresh global install:
This may be linked with #21 and #25.