Home > Back-end >  yarn add @metaplex-foundation/js failing
yarn add @metaplex-foundation/js failing

Time:07-27

I have been trying to run "yarn add @metaplex-foundation/js" for a project I am working on which fails with

error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads https://github.com/Bundlr-Network/avsc
Directory: /Users/.../.../currentrepo
Output:
fatal: unable to connect to github.com:
github.com[0: 140.82.112.3]: errno=Operation timed out
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

This is the only package I cannot install but yarn add works for any other library I try to install with no problem.

One solution I tried was redoing my ssh key which did not help.

I have found similar problems but none with only one package not installing let alone this package specifically.

CodePudding user response:

.gitconfig file was not set up properly to do shh instead of http.

vim ~./gitconfig

Then make necessary edits to file

CodePudding user response:

One solution I tried was redoing my ssh key which did not help.

yarn tries to contact GitHub through HTTPS, so an SSH key would not help here, and would be ignored.

If the same yarn add succeeds in installing other libraries through https://github.com/..., except for this one, then it points to an issue with this specific library (as opposed to a general network issue).

This is Bundlr-Network/avsc, last updated 4 years ago, and which is ultimately forked from the more up-to-date mtth/avsc.
It possibly uses the more recent version of avsc.


If you need Git to use SSH instead of HTTPS in your project, you can try:

git config --global url."[email protected]:".insteadOf https://github.com/
  • Related