kriskbx / gitlab-time-tracker

šŸ¦ŠšŸ•˜ A command line interface for GitLab's time tracking feature.
GNU General Public License v2.0
458 stars 82 forks source link

Can't run commands (beyond `--help`) on Windows in either Git Bash or Command Prompt windows #75

Closed kenny-evitt closed 5 years ago

kenny-evitt commented 6 years ago

I downloaded the gtt-win.exe file for version 1.7.31 from the Releases page:

I copied the executable to a directory in my path (for both Git Bash and Command Prompt) and created a second copy so that there are two copies, one named gtt and the other gtt.exe.

What I'm seeing in Git Bash:

kevitt@KEVITT-P3620 MINGW64 ~
$ gtt --help

  Usage: gtt [options] [command]

  Options:

    -V, --version             output the version number
    -h, --help                output usage information

  Commands:

    start [project] [id]      start monitoring time for the given project and resource id
    create [project] [title]  start monitoring time for the given project and create a new issue or merge request with the given title
    status                    shows if time monitoring is running
    stop                      stop monitoring time
    resume [project]          resume monitoring time for last stopped record
    cancel                    cancel and discard active monitoring time
    log                       log recorded time records
    sync                      sync local time records to GitLab
    edit [id]                 edit time record by the given id
    delete [id]               delete time record by the given id
    report [project] [ids]    generate a report for the given project and issues
    config                    edit the configuration file in your default editor
    help [cmd]                display help for [cmd]

kevitt@KEVITT-P3620 MINGW64 ~
$ gtt help config

kevitt@KEVITT-P3620 MINGW64 ~
$ gtt config

What I'm seeing in Command Prompt:

I:\>gtt --help

  Usage: gtt [options] [command]

  Options:

    -V, --version             output the version number
    -h, --help                output usage information

  Commands:

    start [project] [id]      start monitoring time for the given project and resource id
    create [project] [title]  start monitoring time for the given project and create a new issue or merge request with the given title
    status                    shows if time monitoring is running
    stop                      stop monitoring time
    resume [project]          resume monitoring time for last stopped record
    cancel                    cancel and discard active monitoring time
    log                       log recorded time records
    sync                      sync local time records to GitLab
    edit [id]                 edit time record by the given id
    delete [id]               delete time record by the given id
    report [project] [ids]    generate a report for the given project and issues
    config                    edit the configuration file in your default editor
    help [cmd]                display help for [cmd]

I:\>gtt help config
internal/modules/cjs/loader.js:594
    throw err;
    ^

Error: Cannot find module 'gtt-config'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:592:15)
    at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1278:46)
    at Function.Module._load (internal/modules/cjs/loader.js:518:25)
    at Function.Module.runMain (pkg/prelude/bootstrap.js:1307:12)
    at startup (internal/bootstrap/node.js:274:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:608:3)
pokerazor commented 6 years ago

It's the same for the linux binary. The output is always

gtt-status(1) does not exist, try --help

(depending of course on the subcommand) I also tried the 1.7.30 release and tried to ln -s gtt gtt-status - to no avail

hiulit commented 6 years ago

Same here, on a Mac:

error: gtt-config(1) does not exist, try --help
geek-merlin commented 5 years ago

Me too.

amanuel1995 commented 5 years ago

Any updates on this issue?

hiulit commented 5 years ago

Is the new version published to yarn?

I tried installing it again using yarn global add gitlab-time-tracker --prefix /usr/local and the error still shows.

kriskbx commented 5 years ago

It is fixed in 1.7.34 for yarn installs as well as the precompiled binaries.

hiulit commented 5 years ago

I just installed 1.7.34 and I get the same error

$ gtt config
error: gtt-config(1) does not exist, try --help

on Mac (10.4.2)

kriskbx commented 5 years ago

Can you paste the output of these commands here?

node --version
yarn --version
gtt --version
hiulit commented 5 years ago

BTW, where can I find the config file in a Mac?

I tried looking at ~/.local/share/.gtt but the folder doesn't exists there. I also tried ~/.gtt with no luck either.

Could this be related to the error message above?

hiulit commented 5 years ago

Of course! No problem.

Here you go:

$ node --version
v10.4.1
$ yarn --version
1.13.0
$ gtt --version
1.7.34
kriskbx commented 5 years ago

I just pushed version 1.7.35. Can remove gtt and try again?

hiulit commented 5 years ago

Nice! It's seems to be working on 1.7.35 šŸŽ‰

I typed the command gtt config and it opened a config.yml.