node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

Got an error [ERR_INVALID_ARG_TYPE] #760

Open MatteoGauthier opened 4 years ago

MatteoGauthier commented 4 years ago

Version number 2.8.5

Describe the bug when i type gh command i receive this

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
    at validateString (internal/validators.js:112:11)
    at Object.resolve (path.js:139:9)
    at C:\Users\Mattaio\AppData\Roaming\npm\node_modules\gh\lib\cmds\help.js:47:67
    at async C:\Users\Mattaio\AppData\Roaming\npm\node_modules\gh\lib\cmds\help.js:47:19
    at async Promise.all (index 8)
    at async Object.run (C:\Users\Mattaio\AppData\Roaming\npm\node_modules\gh\lib\cmds\help.js:46:22)
    at async C:\Users\Mattaio\AppData\Roaming\npm\node_modules\gh\lib\cmd.js:178:13 {
  code: 'ERR_INVALID_ARG_TYPE'
}

To Reproduce Steps to reproduce the behavior:

  1. Run Cmd 'gh'
  2. See error
protoEvangelion commented 4 years ago

Are you using yarn 2 by any chance? I just saw this same error when upgrading, but am fixing now.

MatteoGauthier commented 4 years ago

i chose to stay with yarn 1.x.x

Le mar. 10 mars 2020 à 02:32, Ryan Garant notifications@github.com a écrit :

Are you using yarn 2 by any chance? I just saw this same error when upgrading, but am fixing now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/node-gh/gh/issues/760?email_source=notifications&email_token=AHUOP57J53KNADUOGQV462DRGWRFFA5CNFSM4KVZSVR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOJU7FA#issuecomment-596856724, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHUOP5556XXP4ZGC6Q72XHDRGWRFFANCNFSM4KVZSVRQ .

protoEvangelion commented 4 years ago

Does this seem to be resolved with the latest version of gh?

npm i -g gh@2.8.6
MatteoGauthier commented 4 years ago

Got an error on the 2.8.6 version

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
    at validateString (internal/validators.js:112:11)
    at Object.resolve (path.js:139:9)
    at C:\Users\Mattaio\AppData\Roaming\npm\node_modules\gh\lib\cmds\help.js:47:67
    at async C:\Users\Mattaio\AppData\Roaming\npm\node_modules\gh\lib\cmds\help.js:47:19
    at async Promise.all (index 8)
    at async Object.run (C:\Users\Mattaio\AppData\Roaming\npm\node_modules\gh\lib\cmds\help.js:46:22)
    at async C:\Users\Mattaio\AppData\Roaming\npm\node_modules\gh\lib\cmd.js:178:13 {
  code: 'ERR_INVALID_ARG_TYPE'
}
protoEvangelion commented 4 years ago

What was the exact cmd you ran?