First make sure you have installed Visual code, node.js 10.19.X, and npm 6.X version. You can check it on the terminal window by merely entering node -v and npm -v. You can also download latest nodeJS from here.
$ npm -v$ node -v
Make sure you have installed latest angular-cli at least 1.5.X. You can check the ionic version in the terminal with ng -v command if you need more info on how to setup angular4 project, please follow angular official website at their official websites.