Ionic is not recognized as an internal or external command


#1

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.


#2

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


#3

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


#4

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


#5

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


#6

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


#7

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:


#8

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


#9

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


#10

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