gh icon indicating copy to clipboard operation
gh copied to clipboard

Got an error [ERR_INVALID_ARG_TYPE]

Open MatteoGauthier opened this issue 5 years ago • 5 comments

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

MatteoGauthier avatar Feb 15 '20 15:02 MatteoGauthier

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

protoEvangelion avatar Mar 10 '20 01:03 protoEvangelion

i chose to stay with yarn 1.x.x

Le mar. 10 mars 2020 à 02:32, Ryan Garant [email protected] 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 .

MatteoGauthier avatar Mar 10 '20 18:03 MatteoGauthier

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

npm i -g [email protected]

protoEvangelion avatar Mar 10 '20 19:03 protoEvangelion

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'
}

MatteoGauthier avatar Mar 29 '20 18:03 MatteoGauthier

What was the exact cmd you ran?

protoEvangelion avatar Mar 30 '20 15:03 protoEvangelion