Cannot run ionic. receives "No command 'ionic' found"

I solved the problem by cd to my root. Then install ionic as root admin.

$ sudo npm install -g cordova ionic

then run

$ ionic

to see if it's working.


Well, I found it finally.

The ionic installation was at /home/guy/npm/bin/ionic, not at /usr/bin/ionic at it should be.

Solved it with:

sudo ln -s /home/guy/npm/bin/ionic /usr/bin/ionic

for some of you, the two answer above might not work. here's a more general solution for situation where you see "XX" command not found

first check your npm root and npm root -g the result for the npm root -g should be something like "/usr/local". if it's not, then you found your problem.

change it by:

npm config set prefix /usr/local

then npm root -g should give you something like /usr/local/lib/node_modules . Then go ahead re-install everything with -g you will be good to go!