running ganache-cli returns command not found
ganache-cli should return something and should not say command not found
MacBook-Pro:~ susarla$ ganache-cli
-bash: ganache-cli: command not found
ganache-cli
I am trying to run ganache-cli
I am running MacOS HS 10.13.1 with
MacBook-Pro:~ susarla$ node -v
v8.9.3
MacBook-Pro:~ susarla$ npm -v
5.5.1
MacBook-Pro:~ susarla$ which node
/usr/local/bin/node
MacBook-Pro:~ susarla$ which npm
/usr/local/bin/npm
did you npm install -g ganache-cli?
see: https://github.com/trufflesuite/ganache-cli#installation
I've encountered same issue after installing ganache-cli with npm on Debian 9 x86_64.
[Update] Solved the issue by using sudo when installing the package.
To fix this problem make sure that
npm install -gPATH. You can find your npm global bin directory by running npm bin -gFor item 2, copy and paste this one-liner and it'll tell you whether or not you're in good shape:
echo $PATH | grep -q "$(npm bin -g)" && echo "Your PATH is set up correctly." || echo "You need to add '$(npm bin -g)' to your path variable."
NOENT: no such file or directory, access '/usr/local/lib/node_modules/ganache-cli'
still not working
npm WARN deprecated [email protected]: 馃檶 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/ganache-cli
npm WARN [email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! path /usr/local/lib/node_modules/ganache-cli
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/usr/local/lib/node_modules/ganache-cli'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /var/root/.npm/_logs/2018-04-07T13_59_07_679Z-debug.log
Most helpful comment
To fix this problem make sure that
npm install -gPATH. You can find your npm global bin directory by runningnpm bin -gFor item 2, copy and paste this one-liner and it'll tell you whether or not you're in good shape:
echo $PATH | grep -q "$(npm bin -g)" && echo "Your PATH is set up correctly." || echo "You need to add '$(npm bin -g)' to your path variable."