I installed ganache-cli using npm install -g ganache-cli as told
When I type ganache-cli it returns ganache-cli : The term 'ganache-cli' is not recognized
Change %PATH%. Did that, added Node_Modules to the path variable. Run as admin, did that, nothing changes.
When I go to %appdata%\Roaming\npm and type .\ganache-cli it runs
npm install -g ganache-cliganache-cli
I want to create a client and build a smart contract using this
Please verify that the path listed when you run npm bin -g is in your PATH. If it is, please try the following:
Do other npm modules installed with the -g flag run?
Try the following
npx - verify that it doesn't runnpm install -g npxnpx now - is the command found?If npx is found on step 3, and if ganache-cli still doesn't run, then this is likely a problem with ganache-cli. If npx does run, try running Get-Command npx, then go look in whatever directory npx.cmd is in and see if ganache-cli.cmd is there.
On my Windows 10 system when I run Get-Command ganache-cli it tells me that ganache-cli.cmd is located at C:\Program Files\nodejs\ganache-cli.cmd, which is aligned with the output of npm bin -g. I'm not sure if this is the usual path for all recent versions of npm, or if my system is doing something a bit different because I'm using NVM for windows, but npm bin -g or this method should get you on the right track.
Closing this for now, as there's not much else I can offer assistance-wise. If after troubleshooting you feel this is an issue with the way ganache-cli is packaged/distributed, please reopen. Otherwise, please check out the Truffle gitter channel for more immediate help on setup questions like these.
That fixed it, thanks a lot! When I ran npx -v it returned "Path must be a string". Upon installing npx it works perfectly.
Most helpful comment
That fixed it, thanks a lot! When I ran
npx -vit returned "Path must be a string". Upon installing npx it works perfectly.