I installed ganache with yarn, but when I check the version to see if correctly installed, I get the error: "The term 'ganache-cli' is not recognized as the name of a cmdlet, function, script file, or operable program".
I had the same issue but then I installed with npm and it worked
npm install -g ganache-cli
for all people like me who came across this question after a while, ganache-cli
on npm is now ganache
. and it is better to use:
npm install -g ganache
please checkout ganache page on npm.
run commond "npx ganache-cli" instead of "ganach
Even after installing with the below command its possible you will run into the same issue.
npm install -g ganache-cli
In this case check if your path in environment variable is set correctly or is missing.
Environment Variable -> System Variable -> Path
It should be something like this
%UserProfile%\AppData\Roaming\npm
Also once this is set, close your cmd or terminal and try running the Ganache-cli
command in a fresh terminal instance.
Just adding one more point to @OZahed's answer.
Use sudo npm install -g ganache
if you get some error like this:
$ npm install -g ganache
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2022-06-23T12_37_16_476Z-debug.log
© 2022 - 2024 — McMap. All rights reserved.