This is quite late but anyone going through the same problem might benefit from this answer.First try to add browser by running below command
ionic platform add browser
and then run command ionic run browser
.
which is the difference between
ionic serve and ionic run browser
?Ionic serve - runs your app as a website (meaning it doesn't have any Cordova capabilities). Ionic run browser - runs your app in the Cordova browser platform, which will inject cordova.js and any plugins that have browser capabilities
You can refer this link to know more difference between ionic serve
and ionic run browser
command
Update
From Ionic 3 this command has been changed. Use the command below instead;
ionic cordova platform add browser
ionic cordova run browser
You can find out which version of ionic you are using by running: ionic --version