-1

root@localhost:/var/www/html/abcd-seed# ng serve Your global Angular CLI version (7.1.2) is greater than your local version (6.2.8). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch 
false".
** Angular Live Development Server is listening on localhost:4200, 
open your browser on http://localhost:4200/ **

Date: 2018-12-10T14:35:22.329Z
Hash: 35a983178ac09d7b7950
Time: 25011ms
chunk {main} main.js, main.js.map (main) 1.89 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 673 bytes 
[initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.22 kB [entry] 
[rendered]
chunk {styles} styles.js, styles.js.map (styles) 311 kB [initial] 
[rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 329 kB [initial] 
[rendered]

ERROR in node_modules/@angular/common/http/src/response.d.ts(253,21): 
error TS1039: Initializers are not allowed in ambient contexts.
node_modules/@angular/common/http/src/response.d.ts(259,19): error 
TS1039: Initializers are not allowed in ambient contexts.
node_modules/@angular/core/src/application_init.d.ts(26,21): error 
TS1039: Initializers are not allowed in ambient contexts.
node_modules/@angular/core/src/ivy_switch.d.ts(8,54): error TS1254: A 
'const' initializer in an ambient context must be a string or numeric   
literal.
node_modules/@angular/core/src/ivy_switch.d.ts(9,35): error TS1254: A 
'const' initializer in an ambient context must be a string or numeric 
literal.
node_modules/@angular/core/src/linker/query_list.d.ts(36,22): error 
TS1039: Initializers are not allowed in ambient contexts.

ℹ 「wdm」: Failed to compile.
Vijay Prajapati
  • 208
  • 1
  • 5
  • 19

1 Answers1

2

Just deleted node_modules and package-lock.json and upgrade my project its working for me. i followed this https://medium.com/@jeroenouw/upgrade-to-angular-6-4520e46c682b

Vijay Prajapati
  • 208
  • 1
  • 5
  • 19