Can not manage to update ionic cli?

Hi I had some issue where Ionic Info was not working. I managed to get it working, where I uninstalled I ionic, but when I try to preform a “npm i @ionic/cli@latest”, it is not updating.

I am stuck on 4.12.0

When I do an Ionic Info this is my output


ionic (Ionic CLI) : 4.12.0
Ionic Framework : @ionic/angular 5.6.0
@angular-devkit/build-angular : 13.0.1
@angular-devkit/schematics : 0.9.0-beta.3
@angular/cli : 9.1.13
@ionic/angular-toolkit : 5.0.0


capacitor (Capacitor CLI) : 3.3.1
@capacitor/core : 3.3.1


cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : not available
Cordova Plugins : not available


ios-sim : 8.0.2
NodeJS : v16.13.0 (/usr/local/bin/node)
npm : 8.1.0
OS : macOS Monterey
Xcode : Xcode 13.1 Build version 13A1030d

Can you please advice, how I can refresh Ionic,Capactior and Ng modules folder?


Before we get to your question, a word of advice: slow your roll. Don’t upgrade everything constantly, unless you want to be part of the vanguard of testers that find incompatibilities amongst giant moving codebases.

To wit: Neither Angular 13 nor npm 8 is supported by any released version of Ionic Framework. My rule of thumb is: make a new project with ionic start. Look at the package.json therein. Do not try to bump major versions of anything past what is in that new project.

Now, to answer your question, far and away the best way to deal with Node.js for development is nvm. Uninstall any versions of node that you have currently got via a package manager or otherwise, then follow nvm’s installation instructions and life will become much easier.

I guess I learned the hard way, as this my first Mac, so when it said update, I pressed update. After which things starting having issues.

If I go back to my original project, before I started playing around, I get the following message when I do an ionic info.

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))

at macosRelease (/Users/dharmeshjoshi/Downloads/App0001-Aardra Cloud App/node_modules/macos-release/index.js:26:26)
at osName (/Users/dharmeshjoshi/Downloads/App0001-Aardra Cloud App/node_modules/os-name/index.js:21:18)
at Environment.getInfo (/Users/dharmeshjoshi/Downloads/App0001-Aardra Cloud App/node_modules/ionic/lib/index.js:45:20)
at async (/Users/dharmeshjoshi/Downloads/App0001-Aardra Cloud
at async Promise.all (index 0)
at async InfoCommand.execute (/Users/dharmeshjoshi/Downloads/App0001-Aardra Cloud
at async (/Users/dharmeshjoshi/Downloads/App0001-Aardra Cloud App/node_modules/ionic/lib/executor.js:53:9)
at async Executor.execute (/Users/dharmeshjoshi/Downloads/App0001-Aardra Cloud
at async (/Users/dharmeshjoshi/Downloads/App0001-Aardra Cloud App/node_modules/ionic/index.js:104:9)

At this stage I can successfully preform an Ionic serve and build.

Does not seems to be Mac OS or Xcode update after all.

I manged to get my code working again. It seems that previously when working on my Windows PC , I Installed capacitor Geolocator plugin , preformed a npx cap sync, and committed to my local repository.

Then i updated my copy on the MacBook and it seems that at that point things started going wrong. Seems it might have changed some file.

If I am correct is it best all ways install the plugins on device i am working on independently.

Well its compile again.

But in Xcode i am get various Device.swift related errors such as Nonzero exit.