Recently, I downloaded an Angular template that utilizes the Angular Material library. While trying to run this template on my local machine, I successfully executed the npm install
command. However, when attempting to run ng serve
, I encountered several warnings and errors as listed below:
Your global Angular CLI version (6.0.7) is higher than your local version (1.7.4). The local Angular CLI version will be used.
To disable this warning, use "ng config -g cli.warnings.versionMismatch false".
@angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dbb8b4b6abb2b7bea9f6b8b7b29beff5eff5ec">[email protected]</a> requires typescript@'>=2.1.0 <2.4.0' but 2.5.3 was found instead.
Using this version can result in undefined behavior and difficult to debug problems.
To resolve this issue, please run the following command to install a compatible version of TypeScript:
npm install typescript@'>=2.1.0 <2.4.0'
To disable this warning, run "ng set warnings.typescriptMismatch=false".
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
11% building modules 13/15 modules 2 active ...modules/style-loader/lib/addStyles.jswebpack: wait until bundle finished: /
Date: 2018-07-01T07:48:54.668Z
Hash: 7980dfc21e378497af3e
Time: 30697ms
chunk {inline} inline.bundle.js (inline) 3.85 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 1.91 MB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 595 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 211 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 20.4 MB [initial] [rendered]
Warnings about missing exports from various '@angular' packages continue... (truncated for brevity)
Errors were also encountered during the compilation process indicating metadata version mismatches between modules.
For further details about these errors, refer to your package.json file or the system configuration information provided below.
package.json
Copy of package.json content goes here...
My System Configuration
Angular CLI: 6.0.7
Node: 8.11.2
OS: linux x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.6.7
@angular-devkit/core 0.6.7
@angular-devkit/schematics 0.6.7
@schematics/angular 0.6.7
@schematics/update 0.6.7
rxjs 6.2.0
typescript 2.7.2