1

I am installing @graphprotocol/graph-cli with yarn with the command

yarn global add @graphprotocol/graph-cli

I get the success message saying:

success Installed "@graphprotocol/graph-cli@0.31.0" with binaries:
  - graph

But when I try to check its version with graph --version it says:

Command 'graph' not found, but can be installed with:
sudo apt install plotutils

I don't know how to resolve this issue.

torek
  • 448,244
  • 59
  • 642
  • 775
DevArcane
  • 21
  • 2

2 Answers2

1

So ubuntu was not picking it up from the installed directory. What fixed it for me was this command:

yarn global add @graphprotocol/graph-cli --prefix /usr/local

I had to specify where yarn should install this package. After running this command it automatically picked graph in the terminal. If anyone can explain why this worked, I'd be obliged.

DevArcane
  • 21
  • 2
0

I went through the same error and fix it by using npm

npm install -g @graphprotocol/graph-cli

Poupou
  • 1