Reputation: 55
I need to update my angular project but I'm having some issues. It shows me the following message:
Your global Angular CLI version (8.0.1) is greater than your local
version (1.7.4). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Error: Cannot update safely because packages have conflicting dependencies. Package @angular/core would need to match both versions "7.2.15" and "8.0.0, which are not compatible.
Cannot update safely because packages have conflicting dependencies. Package @angular/core would need to match both versions "7.2.15" and "8.0.0, which are not compatible.
If anyone could help me ?
Upvotes: 2
Views: 2802
Reputation: 42526
When it comes to upgrading your Angular project in general, simply run this:
ng update
Otherwise, if you want to perform an upgrade on just the CLI, you can the specific package as an option
ng update @angular/cli
Or directly install via npm
npm install --save-dev @angular/cli
If you need to do a hard reset, you can first install the CLI globally, followed by updating the one in your project itself.
npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/cli@latest
Then, you cd
to our project directory,
rm -rf node_modules dist
npm install --save-dev @angular/cli@latest
npm i
ng update @angular/cli
ng update @angular/core
npm install --save-dev @angular-devkit/build-angular
Upvotes: 2