Zsh: command not found: ionic

Hi! I am running into a problem. Haven’t use Ionic in a while now and just installed it again from scratch.

I ran npm uninstall -g @ionic/cli I checked that it got erased from /Users/myname/.npm-global/bin and lib. Then installed the latest version with npm i -g @ionic/cli. No problems at all. Everything is installed correctly.

The problem comes when I go to my terminal and write ionic info. The answer is zsh: command not found: ionic.

My versions:
Ionic: 6.20.8 - that I get if I execute /Users/myname/.npm-global/bin/ionic
node: 18.12.1
npm: 8.19.2
ng: 14.2.11

What I’ve already tried:

  • To restart the terminal and the device.
  • To uninstall Ionic installing it again.
    With no luck, though

I just set into my zsh profile
alias ionic="/Users/my-name/.npm-global/bin/ionic"

Hope it helps someone!

1 Like