Vee.Dee
Vee.Dee

Reputation: 23

ERROR in : Unexpected value 'NgxMatDrpModule in node_modules/ngx-mat-daterange-picker/ngx-mat-daterange-picker.d.ts'

While working on an Angular 7 app, encountered below error while building using ng build --configuration=dev

As seen in the exception there's an single quote prefixed to NgxMatDrpModule. Tried deleting node_modules, package-lock.json and reinstalling node modules but still cannot resolve the issue. Could someone help please ?

Environment:

"dependencies": {
    "@angular/animations": "^7.2.15",
    "@angular/cdk": "^7.3.7",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/http": "^7.2.14",
    "@angular/material": "^7.3.7",
    "ngx-mat-daterange-picker": "^1.1.5",
}

"devDependencies": {
    "@angular-devkit/build-angular": "~0.13.0",
    "@angular/cli": "~7.3.0",
    "@angular/compiler-cli": "~7.2.0",
}

ERROR in : Unexpected value 'NgxMatDrpModule in node_modules/ngx-mat-daterange-picker/ngx-mat-daterange-picker.d.ts' imported by the module. Please add a @NgModule annotation. node_modules/ngx-mat-daterange-picker/node_modules/@angular/cdk/coercion/array.d.ts(10,60): error TS1005: ',' expected. node_modules/ngx-mat-daterange-picker/node_modules/@angular/cdk/coercion/array.d.ts(10,61): error TS1005: ',' expected. node_modules/ngx-mat-daterange-picker/node_modules/@angular/cdk/coercion/array.d.ts(10,75): error TS1144: '{' or ';' expected. node_modules/ngx-mat-daterange-picker/node_modules/@angular/cdk/coercion/array.d.ts(10,77): error TS1011: An element access expression should take an argument.

Upvotes: 0

Views: 1265

Answers (1)

Vee.Dee
Vee.Dee

Reputation: 23

Finally resolve the issue, tried different combination of package versions. What worked is upgrading @angular/core from 7.2.0 to 7.2.15

npm install @angular/[email protected]

Upvotes: 0

Related Questions