Reputation: 357
i just update my ionic and cordova version and i got weird issue. in specific folders i got
ionic' is not recognized as an internal or external command
but when i try in other different folders i don't get this issue
I tried to reinstall the node, ionic and cordova and get the same problem.
npm version also shows different versions
C:\Users\adirz>npm -v 4.0.5
C:\Users\adirz>cd myapps
C:\Users\adirz\myapps>npm -v 3.10.9
I run "where npm" command (edited)
C:\Users\adirz>where npm C:\Program Files\nodejs\npm C:\Program Files\nodejs\npm.cmd C:\Program Files\nodejs\node_modules\npm\bin\npm C:\Program Files\nodejs\node_modules\npm\bin\npm.cmd C:\Users\adirz\AppData\Roaming\npm\npm C:\Users\adirz\AppData\Roaming\npm\npm.cmd C:\Users\adirz>cd myapps C:\Users\adirz\myapps>where npm C:\Program Files\nodejs\npm C:\Program Files\nodejs\npm.cmd C:\Program Files\nodejs\node_modules\npm\bin\npm C:\Program Files\nodejs\node_modules\npm\bin\npm.cmd C:\Users\adirz\AppData\Roaming\npm\npm C:\Users\adirz\AppData\Roaming\npm\npm.cmd
C:\Users\adirz\myapps>
screenshot of environment variables
i open new folder and it looks like this
C:\Users\adirz>npm -v 4.0.5
C:\Users\adirz>ionic -v 2.1.18
C:\Users\adirz>cd myapps
C:\Users\adirz\myapps>cd haversami
C:\Users\adirz\myapps\HaverSami>npm -v 3.10.9
C:\Users\adirz\myapps\HaverSami>ionic -v 'ionic' is not recognized as an internal or external command, operable program or batch file.
C:\Users\adirz\myapps\HaverSami>
Upvotes: 0
Views: 620
Reputation: 29614
You seem to have multiple versions of npm installed in different locations with one having packages of cordova and ionic.
Try
where npm
in the command line.
UPDATE: your global npm installed in the system is C:\Program Files\nodejs\npm. your local one is in C:\Users\adirz\npm Delete C:\Users\adirz\npm. You may have to run npm install -g cordova ionic
Upvotes: 0