Closed znikola closed 4 years ago
Their package.json
(note that non-relevant dependencies were removed):
{
"name": "mystore-beta-test",
"version": "0.0.0",
"scripts": {
...
},
"private": true,
"dependencies": {
"@angular/animations": "^9.1.12",
"@angular/cdk": "^9.2.4",
"@angular/common": "~9.1.12",
"@angular/compiler": "~9.1.12",
"@angular/core": "^9.1.12",
"@angular/forms": "~9.1.12",
"@angular/material": "^9.2.4",
"@angular/platform-browser": "~9.1.12",
"@angular/platform-browser-dynamic": "~9.1.12",
"@angular/platform-server": "^9.1.12",
"@angular/pwa": "^0.801.0",
"@angular/router": "~9.1.12",
"@angular/service-worker": "~9.1.12",
"@spartacus/assets": "~1.5.6",
"@spartacus/core": "~1.5.6",
"@spartacus/storefront": "~1.5.6",
"@spartacus/styles": "~1.5.6",
...
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.901.12",
"@angular/cli": "^9.1.12",
"@angular/compiler-cli": "^9.1.12",
"@angular/language-service": "~9.1.12",
"@spartacus/schematics": "~1.5.6",
...
}
}
One possible cause is that the angular dependencies were not properly aligned. Note that in the package.json
(provided above ) some dependencies use ~
, while others use ^
.
Another possible cause is the "@angular/pwa": "^0.801.0",
, which was aligned with the rest (v8 vs. v9).
Having non-aligned dependencies like this seems to be confusing for Angular.
The solution was to align them like this:
{
"name": "mystore-beta-test",
"version": "0.0.0",
"scripts": {
...
},
"private": true,
"dependencies": {
"@angular/animations": "^9.1.12",
"@angular/cdk": "^9.2.4",
"@angular/common": "^9.1.12",
"@angular/compiler": "^9.1.12",
"@angular/core": "^9.1.12",
"@angular/forms": "^9.1.12",
"@angular/material": "^9.2.4",
"@angular/platform-browser": "^9.1.12",
"@angular/platform-browser-dynamic": "^9.1.12",
"@angular/platform-server": "^9.1.12",
"@angular/pwa": "^0.901.12",
"@angular/router": "^9.1.12",
"@angular/service-worker": "^9.1.12",
"@spartacus/assets": "~1.5.6",
"@spartacus/core": "~1.5.6",
"@spartacus/storefront": "~1.5.6",
"@spartacus/styles": "~1.5.6",
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.901.12",
"@angular-devkit/schematics": "^9.1.12",
"@angular/cli": "^9.1.12",
"@angular/compiler-cli": "^9.1.12",
"@angular/language-service": "^9.1.12",
"@spartacus/schematics": "~1.5.6",
...
}
}
A client reported a bug when upgrading from 1.5.x to 2.0.x: