Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic cordova builder not working with angular 16. #493

Closed
halilpolathalil opened this issue Jun 8, 2023 · 3 comments · Fixed by #495
Closed

Ionic cordova builder not working with angular 16. #493

halilpolathalil opened this issue Jun 8, 2023 · 3 comments · Fixed by #495

Comments

@halilpolathalil
Copy link

Hi, I create ionic 7 starter app according to ionic docs. When I run the command "ionic cordova run android -c -s -l", it gives error like "This version of CLI is only compatible with Angular versions ^15.0.0, but Angular version 16.0.4 was found instead.". How can I solve this error.

@ydalvik
Copy link

ydalvik commented Jun 13, 2023

Hey,
i have the same error, but :

"overrides": {
		"@ionic/cordova-builders": {
			"@angular-devkit/architect": "^0.1600.5",
			"@angular-devkit/build-angular": "^16.0.5",
			"@angular-devkit/core": "^16.0.5",
			"@angular/core": "^16.0.5",
			"@angular-devkit/schematics": "^16.0.5",
			"@schematics/angular": "^16.0.5"
		}
}

inside your package.json avoid this error.
requires npm 8.3+

@KGHawes-DeLess
Copy link

The override solution didn't work for me...even after doing ionic repair, it just traded one set of issues for another. Globally, I only have @ionic/cli@7.1.1 and tried @angular/cli@16.0.4 and 16.1.1

@halilpolathalil
Copy link
Author

halilpolathalil commented Jun 15, 2023

I solve with downgrading to angular 15.0.
Solution:

  1. Create a New ionic angular project.
  2. Delete node modules folder.
  3. Open package.json and change all 16 to 15.(you can use Ctrl+f if you use vs code.)
  4. Finally use yarn install command to install all upadated package version.
    Probably some Package is going to give dependcy warning. Especially typescript version. If it is, then you have to change version of these package to version of in the warning. You can change version of typescript version to 5.0. Good luck.

mhartington added a commit that referenced this issue Jul 5, 2023
Bumps dependencies to support version 16 of Angular

BREAKING CHANGE: The minimum version of Angular required is now 16. Please updates your apps to use
the lates release of Angular

Closes #493. Closes #494
mhartington added a commit that referenced this issue Jul 5, 2023
Bumps dependencies to support version 16 of Angular

BREAKING CHANGE: The minimum version of Angular required is now 16. Please updates your apps to use
the lates release of Angular

Closes #493. Closes #494
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants