Yes, I know that there are already thousands of similar questions - And no, none of the answers have worked for me. I already had a problem with upgrading my Angular quite some while ago, and just decided to ignore the new updates.
At first, I used the "standard" upgrade command: npm install @angular/common@latest @angular/compiler@latest @angular/compiler-cli@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest @angular/animations@latest typescript@latest --save That, however, resulted in the following error (+ Lots of warnings at the end):
+-- @angular/[email protected] +-- @angular/[email protected] +-- UNMET PEER DEPENDENCY @angular/[email protected] +-- @angular/[email protected] invalid | +-- @angular/[email protected] | | `-- [email protected] | `-- [email protected] +-- UNMET PEER DEPENDENCY @angular/[email protected] +-- @angular/[email protected] +-- @angular/[email protected] +-- @angular/[email protected] +-- @angular/[email protected] +-- @angular/[email protected] | +-- [email protected] | `-- [email protected] +-- @angular/[email protected] +-- [email protected] | +-- @angular-cli/[email protected] | | `-- [email protected] | +-- UNMET PEER DEPENDENCY @angular/[email protected] | +-- UNMET PEER DEPENDENCY @angular/[email protected] | | `-- @angular/[email protected] | +-- UNMET PEER DEPENDENCY @angular/[email protected] | `-- [email protected] +-- [email protected] invalid `-- UNMET PEER DEPENDENCY [email protected] Okay, no big deal, a quick google search told me (once again) to simply install each unmet peer dependency on its own. The problem: Regardless which of the peer dependencies that aren't met I try to install, I get unmet peer dependencies errors. Example: The first command told me that zone.js dependency isn't met. So I quickly run npm install [email protected], and get the error message with a few unmet dependencies, INCLUDING packages such as @angular/core for example, which, when I try to install them, tell me that amongst the unmet dependencies is zone.js.
Basically: The dependencies seem to depend on each other, and I'm not able to install any of them. My package.json got updated correctly, with all package versions shown as they should be, but I can not run my project, because the packages aren't installed.
The only solution that I haven't tried yet is re-installing Angular completely - Which I'd like to avoid, if possible.
So, considering that anything regarding package.json doesn't work (Deleting, removing the versions, ...) and I can not install the dependencies that are shown as unmet, what exactly should I do to upgrade Angular properly?