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

Warnings when updating #704

Closed jpince closed 4 years ago

jpince commented 4 years ago

Version number 2.3.0 (might have been introduced in an earlier version, I haven't updated in a while)

Describe the bug Warning messages when updating 1.17.5 → 2.3.0

npm WARN enoent ENOENT: no such file or directory, open '/media/jpince/l/72x/package.json'
npm WARN marked-terminal@3.2.0 requires a peer of marked@^0.4.0 || ^0.5.0 || ^0.6.0 but none was installed.
npm WARN 72x No description
npm WARN 72x No repository field.
npm WARN 72x No README data
npm WARN 72x No license field.

To Reproduce Steps to reproduce the behavior:

  1. Start on version 1.17.5
  2. Run Cmd 'sudo npm i gh'
  3. See warnings at the end

Expected behavior No warnings

protoEvangelion commented 4 years ago

Thanks for reporting @jpince I will take a look 👍

jpince commented 4 years ago

Thanks for keeping this up, Ryan. It's a great tool!

protoEvangelion commented 4 years ago

So I was able to repro something similar but it was a different file missing. Doing npm uninstall -g gh and npm install -g gh fixed it.

Are you install with a global flag? -g

jpince commented 4 years ago

I don't think I've ever used the -g flag. I used the steps above to uninstall/install. Most of the errors went away, this was left:

npm WARN marked-terminal@3.2.0 requires a peer of marked@^0.4.0 || ^0.5.0 || ^0.6.0 but none was installed.
protoEvangelion commented 4 years ago

Those npm warnings are common :)

Node CLIs are usually designed to be installed in your npm global dir so they can be used anywhere. In GH's case, I'm actually surprised it still works for you because when we try to resolve modules we do a lookup on npm's global dir.

Closing now, but if anyone encounters this issue please reopen.

jpince commented 4 years ago

got it, thanks!