1

I'm trying to install the katacoda client. I used NPM to install it:

npm install -g katacoda-cli

The installation was successful but when I'm trying to run the katacoda help I've got the following error: command not found: katacoda. NPM installed katacoda here: /usr/local/Cellar/node/10.7.0/lib/node_modules/katacoda-cli. If I run the following: /usr/local/Cellar/node/10.7.0/lib/node_modules/katacoda-cli/bin/run help katacoda is executed correctly. I guess my problem is coming from my $PATH, which is set like this: export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

mel
  • 25
  • 3
  • You have to have katacoda in your `$PATH`. You can soft link `/usr/local/Cellar/node/10.7.0/lib/node_modules/katacoda-cli/bin/run` as `katacoda` somewhere in your `$PATH` – Panwen Wang May 16 '20 at 17:15
  • Thanks @PanwenWang how can I do that? I tried `export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Cellar/node/10.7.0/lib/node_modules/katacoda-cli/bin/run"` – mel May 16 '20 at 17:18
  • You can go to one of the directories, say `/usr/local/bin`, and then run `ln -s /usr/local/Cellar/node/10.7.0/lib/node_modules/katacoda-cli/bin/run katacoda`. Then you should be able to run `katacoda` directly. If you don't have permissions to do so in `/usr/local/bin`, choose another directory where you have permissions, do the same and add the directory to your `$PATH` – Panwen Wang May 16 '20 at 17:21
  • Perfect that solved my problem. Can you add it as an answer and I will close? – mel May 16 '20 at 17:34

1 Answers1

0

You can go to one of the directories, say /usr/local/bin, and then run ln -s /usr/local/Cellar/node/10.7.0/lib/node_modules/katacoda-cli/bin/run katacoda. Then you should be able to run katacoda directly. If you don't have permissions to do so in /usr/local/bin, choose another directory where you have permissions, do the same and add the directory to your $PATH

Panwen Wang
  • 3,573
  • 1
  • 18
  • 39