I have tried to install ionic framework. I was done with my first step by executing the command (installed node.js).
First command: npm install -g cordova ionic
I assume you are trying to install ionic in windows. I think you could try to install it alone, without cordova, and then try it again.
npm install -g ionic
Regards