Ionic is not recognized as an internal or external command

I ran one application and I got a notification that Ionic is out-of-date. So I updated it using the command npm update -g ionic but now, when I try running the application, it show ionic is not recognized as an internal or external command.

try to clean the npm cache and re installed ionic, that will work perfectly

2 Likes

I had the exact same problem after updating and @sarale’s suggestion worked great.

2 Likes

Well I re-installed ionic. It worked fine then. Thanks guys.

Still i am getting ionic not recognized. I tried the clean also

You should try re-installing cordova as well as ionic. hope that works.

Check if the configuration is broken or not. the update might have installed it in the wrong place.

First check: npm config get prefix

In my case It wasn’t set to /usr/local but in /usr/Roaming.

So to fix it, use: npm config set prefix

Problem solved! :smile:

set the path environment variables in Windows C:\Users\«user name folder»\appdata\Roaming\npm

Nothing works for me. Its really painful to work with Ionic.

1 Like

thanks bro its know working :slight_smile:
Check if the configuration is broken or not. the update might have installed it in the wrong place.

First check: npm config get prefix

In my case It wasn’t set to /usr/local but in /usr/Roaming.

So to fix it, use: npm config set prefix