This guide is specific to upgrading from Angular 12 to 14. It should be completed before building and running tests.
Prerequisites
Angular 14 will not work with libraries built with 12 due to changes for the standalone component feature.
error TS2314: Generic type 'ɵɵDirectiveDeclaration' requires 6 type argument(s).
Upgrade Steps
- Complete the general upgrade guide.
- If the workspace has libraries, configure them to compile in partial mode by adding the following to
tsconfig.lib.json."angularCompilerOptions": { "compilationMode": "partial" } - If the workspace CI pipeline supports it, enable the build cache for CI by running the following. The cache is enabled for local development by default.
ng config cli.cache.environment all - Remove
defaultCollectionfromangular.jsonand, run the following.defaultCollectionis deprecated.ng config cli.schematicCollections "[\"<default-schematic>\"]" - If the workspace has a projects directory, ensure scripts in
package.jsonspecify the project name.defaultProjecthas been deprecated. - Remove all tilde (~) prefixes from SCSS imports in style files.