I am currently stucked in very weird issue in Angular. I was working on one my branch a week ago it was fine and building correctly. But I don't know how it start complaing during 'ng build' below is the error I am keep getting today:
node_modules/@types/babel__traverse/index.d.ts(1136,44): error TS1109: Expression expected.
node_modules/@types/babel__traverse/index.d.ts(1137,21): error TS1109: Expression expected.
node_modules/@types/babel__traverse/index.d.ts(1137,37): error TS1005: ';' expected.
node_modules/@types/babel__traverse/index.d.ts(1137,43): error TS1109: Expression expected.
node_modules/@types/babel__traverse/index.d.ts(1139,1): error TS1128: Declaration or statement expected.
I tried below options to fix this but didn't get any success:
Option 1 - removing and installing node_modules, Option 2 - removing and installing @types/babel_traverse
Can anyone let me know what could be the reason. Here are my local angular/dependancy installed versions:
Angular CLI: 7.3.10
Node: 8.15.0
OS: win32 x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, elements
... forms, http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.13.10
@angular-devkit/build-angular 0.13.9
@angular-devkit/build-ng-packagr 0.13.9
@angular-devkit/build-optimizer 0.13.9
@angular-devkit/build-webpack 0.13.9
@angular-devkit/core 7.3.10
@angular-devkit/schematics 7.3.10
@angular/cdk 7.3.7
@angular/cli 7.3.10
@angular/material 7.3.7
@angular/material-moment-adapter 7.3.7
@ngtools/json-schema 1.1.0
@ngtools/webpack 7.3.9
@schematics/angular 7.3.10
@schematics/update 0.13.10
ng-packagr 4.7.1
rxjs 6.3.3
typescript 3.2.1
webpack 4.29.0
Please note that I can't update anything at this point because my project is already in production.
Many thanks in advance.