Apress/pro-angular-6

Was not able to serve first angular app

Opened this issue · 1 comments

p. 11 when running : ng serve --port 3000 open

I got the following error.

Thank you very much.

PS C:\web\angularTest\todo\src> ng serve --port 3000 --open
** Angular Live Development Server is listening on localhost:3000, open your browser on http://localhost:3000/ **
10% building modules 6/6 modules 0 activei 「wds」: Project is running at http://localhost:3000/
i 「wds」: webpack output is served from /
i 「wds」: 404s will fallback to //index.html

Date: 2019-10-13T06:46:40.749Z
Hash: b287a6d9b0afddc8d6f3
Time: 1978ms
chunk {main} main.js, main.js.map (main) 354 kB [entry] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 354 kB [entry] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 513 kB [entry] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 5.5 kB [initial] [rendered]

ERROR in ../node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected.
../node_modules/rxjs/internal/types.d.ts(81,74): error TS1005: ';' expected.
../node_modules/rxjs/internal/types.d.ts(81,77): error TS1109: Expression expected.
../node_modules/rxjs/internal/types.d.ts(82,52): error TS1005: ';' expected.
../node_modules/rxjs/internal/types.d.ts(82,88): error TS1005: ';' expected.
../node_modules/rxjs/internal/types.d.ts(82,92): error TS1109: Expression expected.

i 「wdm」: Failed to compile.

I ran across this problem too. You can try this.

In package.json file where is says "rxjs": "^6.0.0" change it to "rxjs": "6.0.0". Then issue 'npm i' at the command line.