Ionic 2 cordova installation

Hi, One month back I have installed Ionic2 and cordova, with the command Npm install -g ionic cordova , with nodejs version > 4 . It worked perfectly fine. 2 days back when I tried to start a new ionic project it throwed an error saying to update nodejs version. So Installed latest nodejs version which is 7.1. After that When I started to create a new project it again throwed an error “Ionic is not recognized” . I dont know what I am missing here. Any help will be greatly appreciated

You probably need to run npm install -g ionic cordova again. An upgrade of node necessitates a reinstall of global packages, iirc

1 Like

Is there a reason to use 7.1? If that turns out to be the problem, you could use the 6.9.1 LTS which is still very recent at the moment.

The version itself is very likely not the problem.

I updated the nodejs version as , I had an error before saying “Enode file not found” make sure that you have the latest version of nodejs and npm. Once I updated nodejs, problem has started saying "Ionic is not recognized " .
I checked the npm path variable, it’s in its place, restarted it and did everything possible .
I dont understand what I am missing

Do you use NVM? That is the best way to manage Node.js versions. But any time you install a new version of node, you have to install versions of packages that work on that version of node. I highly recommend NVM as it normally alleviates these types of problems. If you have any further problems, I would recommend adding more details :slight_smile:

Thank you very much for the reply. I will apply the suggestion you gave .