I'm following the instructions for installing foxx-cli here: arangodb/foxx-cli: CLI for managing Foxx services.
specifically, I did these steps:
sudo pacman -S nodejs yarn
yarn global add foxx-cli
success Installed "[email protected]" with binaries:
- foxx
Done in 13.33s.
The next step in the instructions is:
$ foxx --help
I get:
-bash: foxx: command not found
I also tried foxx-cli and it is also not found. Trying another way:
$ node
> foxx
ReferenceError: foxx is not defined
trying things from other tutorials hasn't helped. For example, I tried this command in node:
> db = new Database('http://192.168.1.1:8529');
ReferenceError: Database is not defined
As you can see, I have never used node before. There must be something very basic missing from the instructions, something that anyone familiar with node would know to do. But looking around at node tutorials hasn't revealed to me what step I'm missing.
More info:
node --version
v11.4.0
sudo uname -a
Linux 4.19.4-arch1-1-ARCH #1 SMP PREEMPT Fri Nov 23 09:06:58 UTC 2018 x86_64 GNU/Linux
An alternative way to install Foxx Microservices, as suggested in the tutorial, is:
I have not used nodejs or yarn before, but in hindsight it is clear that
yarn
failed even though it reported success:It was not, in fact, installed successfully. Rather than troubleshoot
yarn
, I tried npm.After installing with npm, running the suggested command succeeds:
The tutorial did not make it clear whether foxx was executable from the shell prompt or within nodejs. Once properly installed, it does execute from the shell prompt.