Search code examples
angularnode-modules

Uncaught Error: Can't resolve all parameters for ScrollbarHelper: (?). at syntaxError (compiler.js:2175:1)


I was updating my angular project form 7.3.10 to 8.3.29. I have updated all the node modules one by one solving all the errors, at last it got compiled successfully. But In the browser console I got an error showing this:

compiler.js:2175 Uncaught Error: Can't resolve all parameters for 
  ScrollbarHelper: (?).
   at syntaxError (compiler.js:2175:1)
   at CompileMetadataResolver._getDependenciesMetadata 
    (compiler.js:20401:1)
   at CompileMetadataResolver._getTypeMetadata (compiler.js:20296:1)
   at CompileMetadataResolver._getInjectableTypeMetadata 
     (compiler.js:20514:1)
   at CompileMetadataResolver.getProviderMetadata (compiler.js:20523:1)
   at compiler.js:20461:1
   at Array.forEach (<anonymous>)
   at CompileMetadataResolver._getProvidersMetadata 
     (compiler.js:20421:1)
   at CompileMetadataResolver.getNgModuleMetadata (compiler.js:20148:1)
   at CompileMetadataResolver.getNgModuleSummary (compiler.js:19983:1)

I tried removing the node_modules and re-installing them but it didn't worked.

can some one help me with this ?????

these are my dependencies:

"dependencies":{
   "@agm/core":"^1.0.0-beta.7",
   "@angular/animations":"^8.2.14",
   "@angular/cdk":"^8.2.3",
   "@angular/common":"^8.2.14",
   "@angular/compiler":"^8.2.14",
   "@angular/core":"^8.2.14",
   "@angular/forms":"^8.2.14",
   "@angular/material":"^8.2.3",
   "@angular/platform-browser":"^8.2.14",
   "@angular/platform-browser-dynamic":"^8.2.14",
   "@angular/platform-server":"^7.2.16",
   "@angular/router":"^8.2.14",
   "@ng-bootstrap/ng-bootstrap":"^4.2.2",
   "@ng-idle/core":"^6.0.0-beta.5",
   "@ng-idle/keepalive":"^6.0.0-beta.5",
   "@ng-select/ng-select":"^3.7.3",
   "@ngrx/store":"^6.1.2",
   "@ngx-translate/core":"^13.0.0",
   "@ngx-translate/http-loader":"^2.0.1",
   "@nicky-lenaers/ngx-scroll-to":"^1.1.1",
   "@stomp/stompjs":"^6.1.2",
   "@swimlane/ngx-charts":"^9.0.0",
   "@swimlane/ngx-datatable":"^12.0.0",
   "@types/chartist":"^0.9.48",
   "@types/crypto-js":"^3.1.47",
   "@types/d3-shape":"^1.3.12",
   "@types/jquery":"^3.5.29",
   "@types/socket.io-client":"^1.4.36",
   "angular-calendar":"^0.25.2",
   "angular-ng-autocomplete":"^1.1.6",
   "angular2-cookie":"^1.2.6",
   "angularfire2":"^5.4.2",
   "bootstrap":"4.0.0",
   "bourbon":"^4.3.4",
   "chartist":"^0.11.0",
   "classlist.js":"^1.1.20150312",
   "core-js":"^2.6.12",
   "crypto-js":"^3.3.0",
   "d3":"^4.13.0",
   "datatables.net":"^1.13.11",
   "exceljs":"^4.2.1",
   "file-saver":"^2.0.5",
   "firebase":"^5.1.0",
   "intl":"^1.2.5",
   "jquery":"^3.7.1",
   "jszip":"^3.10.1",
   "material-design-icons":"^3.0.1",
   "moment":"^2.30.1",
   "net":"^1.0.2",
   "ng-chartist":"^1.1.1",
   "ng-click-outside":"^4.0.0",
   "ng2":"^0.2.4",
   "ng2-charts":"^1.6.0",
   "ng2-completer":"^3.0.3",
   "ng2-dragula":"^2.1.1",
   "ng2-file-upload":"^1.3.0",
   "ng2-img-cropper":"^0.9.0",
   "ng2-nouislider":"^1.8.3",
   "ng2-smart-table":"^1.5.0",
   "ng2-validation":"^4.2.0",
   "ng6-toastr-notifications":"^1.0.4",
   "ngx-chips":"^1.9.8",
   "ngx-pagination":"^3.1.0",
   "ngx-quill":"^4.8.0",
   "ngx-ui-switch":"^1.4.9",
   "node-sass":"^4.11.0",
   "nouislider":"^11.1.0",
   "npm":"^6.4.1",
   "primeicons":"^1.0.0-beta.10",
   "primeng":"^6.1.3",
   "quill":"^1.3.7",
   "resize-observer-polyfill":"^1.5.0",
   "rxjs":"^6.4.0",
   "screenfull":"^3.3.1",
   "socket.io-client":"2.2.0",
   "sockjs-client":"^1.6.1",
   "stompjs":"^2.3.2",
   "stream":"0.0.2",
   "sweetalert2":"^7.12.9",
   "videogular2":"^6.0.6",
   "web-animations-js":"^2.2.5",
   "xlsx":"^0.16.5",
   "zone.js":"^0.9.1"
},
"devDependencies":{
   "@angular-devkit/build-angular":"^0.803.29",
   "@angular/cli":"^8.3.29",
   "@angular/compiler-cli":"^8.2.14",
   "@angular/language-service":"^7.2.16",
   "@types/core-js":"^0.9.43",
   "@types/jasmine":"^2.8.23",
   "@types/moment":"^2.13.0",
   "@types/node":"^9.6.55",
   "codelyzer":"^4.0.2",
   "jasmine-core":"^2.99.1",
   "jasmine-spec-reporter":"^4.2.1",
   "karma":"^2.0.0",
   "karma-chrome-launcher":"^2.2.0",
   "karma-cli":"~1.0.1",
   "karma-coverage-istanbul-reporter":"^1.3.1",
   "karma-jasmine":"^1.1.1",
   "karma-jasmine-html-reporter":"^0.2.2",
   "protractor":"^5.4.1",
   "ts-node":"^4.1.0",
   "tslint":"^5.7.0",
   "typescript":"^3.5.3"
}


Solution

  • could be related to the ngx-datatable version. If you are using Angular 8 you should install the latest compatible version, in this case 15.0.2 instead of 12.0.0 (see the Changelog of version 15.0.0 https://github.com/swimlane/ngx-datatable/blob/master/docs/changelog.md#1500)

    when you update Angular you should check all your dependencies and update them to the correct version. It can be tedious but it's worth the effort to avoid strange errors.