2
votes

I tried many times to upgrade the angular packages but this seems to be bottle neck every time.

Google does a lot of rapid changes and brings new versions (even after a day or two a new version is replaced).

Can anybody guide me properly? I tried different articles but I am still getting these errors while upgrading.

These are the guides I am following: First Second

I executed these ng commands to upgrade my source code.

1). ng update @angular/cli @angular/core

... and the response is:

    ClientApp>ng update @angular/cli @angular/core
    Updating package.json with dependency @angular/forms @ "7.1.4" (was "6.0.9")...
    Updating package.json with dependency rxjs @ "6.3.3" (was "6.2.2")...
    Updating package.json with dependency @angular/language-service @ "7.1.4" (was "6.0.9")...
    Updating package.json with dependency @angular/common @ "7.1.4" (was "6.0.9")...
    Updating package.json with dependency @angular/router @ "7.1.4" (was "6.0.9")...
    Updating package.json with dependency @angular/animations @ "7.1.4" (was "6.0.9")...
    Updating package.json with dependency @angular/platform-browser-dynamic @ "7.1.4" (was "6.0.9")...
    Updating package.json with dependency @angular/compiler-cli @ "7.1.4" (was "6.0.9")...
    Updating package.json with dependency @angular/core @ "7.1.4" (was "6.0.9")...
    Updating package.json with dependency @angular/platform-browser @ "7.1.4" (was "6.0.9")...
    Updating package.json with dependency @angular/cli @ "7.1.4" (was "6.0.8")...
    Updating package.json with dependency typescript @ "3.1.6" (was "2.7.2")...
    Updating package.json with dependency @angular/compiler @ "7.1.4" (was "6.0.9")...
UPDATE package.json (2167 bytes)
npm WARN @angular/[email protected] requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/[email protected] requires a peer of typescript@~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/compiler@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser-dynamic@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 123 packages from 82 contributors, removed 8 packages, updated 17 packages, moved 2 packages and audited 23046 packages in 76.044s
found 21 vulnerabilities (9 low, 4 moderate, 8 high)
  run `npm audit fix` to fix them, or `npm audit` for details
Invalid rule result: Function().

-- =====================================================

After the first command has completed, I executed this command:

2). ng update @angular/material

... and I got the following response back on command prompt:

ClientApp>ng update @angular/material
              Package "@angular/flex-layout" has an incompatible peer dependency to "@angular/cdk" (requires "^6.0.0", would install "7.2.0").

Incompatible peer dependencies found. See above.

========================================================================

After your mentioned commands, I have executed

1). npm i @angular/[email protected] --save

and the response is below:

ClientApp>npm i @angular/[email protected] --save

npm WARN @angular/[email protected] requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself. npm WARN @ngtools/[email protected] requires a peer of typescript@~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of @angular/compiler@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of @angular/core@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of @angular/platform-browser-dynamic@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of @angular/platform-browser@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of @angular/common@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of @angular/common@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of @angular/core@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/cdk@^7.0.0-rc.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

===================================================================

After flex-layout npm package command,

2). ng update @angular/material

and the response is :

    ClientApp>ng update @angular/material
    Updating package.json with dependency @angular/cdk @ "7.2.0" (was "6.3.3")...
    Updating package.json with dependency @angular/material @ "7.2.0" (was "6.3.3")...
UPDATE package.json (2167 bytes)
npm WARN @ngtools/[email protected] requires a peer of typescript@~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/compiler@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser-dynamic@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1 package from 1 contributor, removed 1 package, updated 2 packages and audited 23046 packages in 24.069s
found 21 vulnerabilities (9 low, 4 moderate, 8 high)
  run `npm audit fix` to fix them, or `npm audit` for details
1

1 Answers

2
votes

Do you have a public repo for this so it can be reproduced ?

Although a quick check revelaled , you should update @angular/flex-layout to 7.0.0-beta.22

This to remove the incompatible warnings//errors

npm i @angular/[email protected] --save

This suggestion is based on the above console output and the commands. It seems some package is holding angular/[email protected], probably @angular/flex-layout. I will probably update that before running material update.