I installed Angular CLI v.6. Then I create a new project.
npm install -g @angualr-cli@^6.0.0
ng new my-app
cd my-app
npm install
npm build
The build fails with the following error.
chunk {main} main.js, main.js.map (main) 604 bytes [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 659 bytes [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 15.6 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.
Thanks.
Update: The angular cli version:
ng version
Angular CLI: 6.0.8
Node: 10.15.3
OS: win32 x64
Angular: 6.1.10
Update: npm install -g @angular/cli@^6.0.0 deos not install the latest verison
npm install -g @angular/cli@"<7.0.0" will install the latest version v.6. The problem sovled after install the latest Angular-cli v.6.2.9

Try rm -rf node_modules/ and npm install inside of my-app