Moralis CLI for mac

Hey guys i have installed moralis cli on MacOs using npm install -g moralis -admin-cli and it appears to have installed successfully. However i can’t run any commands as i get “bash: moralis command not found” … Any mac users here who use moralis CLI?Screen Shot 2021-09-10 at 2.46.24 PM

maybe you don’t have in PATH the location of that file
not sure if starting another terminal would help

how so ? i used the -g flag to install moralis so shouldn’t it work regardless? Also i’m in the folder where i did the install command

It works on mac - most devs use Moralis on mac. You need to know how to install npm packages on mac - it’s like any other npm package.

If you installed an npm package and it still doesn’t work - you need to double check if your system is set up properly with npm so npm puts packages in same folder where your system looks for them

You could check where it was installed by running npm root -g, and then you can check if the folder that contains node binaries (maybe it is .bin folder in same folder with modules) it is in what echo $PATH returns.

Even if you are in the folder where that script is, you’ll have to use `./moralis-admin-cli in order to run it if the folder that contains the script is not found in $PATH variable. The $PATH variable contains the folders from where the operating system will try to find what you are trying to execute on command line.

I can see the folder where npm installs is /usr/local/lib/node_modules and i can see moralis installed there along side truffle, yarn etc. I’ve been using npm packages on this device and usually require no extra configuration, it’s my main programming device so this is a bit confusing

Screen Shot 2021-09-11 at 1.07.46 PM

moralis-admin-cli is not there, meaning you haven’t run installation process as explained here

Please check :raised_hands:

Thank you! works now, i must have added a space when i initialy tried to install the pacakge, works fine now.