First time user is unable to run any command
marcbizal opened this issue Β· comments
Version number
2.7.0
Describe the bug
I am unable to use gh
due to an error that occurs when running any command.
{ Error: ENOENT: no such file or directory, open '/Users/marcusbizal/.nvm/versions/node/v12.8.1/lib/node_modules/gh/default.gh.json'
at Object.openSync (fs.js:448:3)
at Object.readFileSync (fs.js:348:35)
at Object.createGlobalConfig (/Users/marcusbizal/.nvm/versions/node/v12.8.1/lib/node_modules/gh/lib/configs.js:113:53)
at Object.run (/Users/marcusbizal/.nvm/versions/node/v12.8.1/lib/node_modules/gh/lib/cmd.js:159:19)
at Object.<anonymous> (/Users/marcusbizal/.nvm/versions/node/v12.8.1/lib/node_modules/gh/bin/gh.js:24:26)
at Module._compile (internal/modules/cjs/loader.js:805:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
at Module.load (internal/modules/cjs/loader.js:672:32)
at tryModuleLoad (internal/modules/cjs/loader.js:612:12)
at Function.Module._load (internal/modules/cjs/loader.js:604:3)
errno: -2,
syscall: 'open',
code: 'ENOENT',
path:
'/Users/marcusbizal/.nvm/versions/node/v12.8.1/lib/node_modules/gh/default.gh.json' }
To Reproduce
Steps to reproduce the behavior:
npm i -g gh
gh
Expected behavior
I should be able to use gh
commands.
Additional context
I have not previously used gh
on this machine, I have no existing configuration files. Looks like gh
is trying to createGlobalConfig
by saving the default config (in the package) to my home directory. However default.gh.json
is not included in the files
portion of the package.json
, as such it is not available when installed via npm
.
@marcbizal thanks for the bug report. I will take a look ASAP!
π This issue has been resolved in version 2.7.1 π
The release is available on:
Your semantic-release bot π¦π
Thanks for the clear report @marcbizal that fixed it!
@all-contributors please add @marcbizal for awesome bug report
I've put up a pull request to add @marcbizal! π