Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

/node_modules/@angular/material/core"' has no exported member 'CanColorCtor'. #48

Closed
sandgupta23 opened this issue Nov 26, 2018 · 3 comments

Comments

@sandgupta23
Copy link

ERROR in node_modules/saturn-datepicker/datepicker/datepicker.d.ts(12,20): error TS2305: Module '"C:/Users/sandeepkumar.g/Desktop/nodebook/bot-plateform2/bot_platform-fe
/node_modules/@angular/material/core"' has no exported member 'CanColorCtor'.
node_modules/saturn-datepicker/datepicker/datepicker.d.ts(42,22): error TS2420: Class 'SatDatepickerContent<D>' incorrectly implements interface 'CanColor'.
  Property 'color' is missing in type 'SatDatepickerContent<D>'.

I am using angular 6 and getting this error, which also fails build. I removed and reinstalled node_module but no success. Please advice.

Package.json


 "dependencies": {
   "@angular/animations": "^6.1.10",
   "@angular/cdk": "^7.0.4",
   "@angular/common": "^6.0.3",
   "@angular/compiler": "^6.0.3",
   "@angular/core": "^6.0.3",
   "@angular/forms": "^6.0.3",
   "@angular/http": "^6.0.3",
   "@angular/material": "^6.4.7",
   "@angular/platform-browser": "^6.0.3",
   "@angular/platform-browser-dynamic": "^6.0.3",
   "@angular/pwa": "^0.7.5",
   "@angular/router": "^6.0.3",
   "@angular/service-worker": "^6.0.3",
   "@fortawesome/fontawesome-free": "^5.4.1",
   "@ngxs/devtools-plugin": "^3.1.4",
   "@ngxs/logger-plugin": "^3.1.4",
   "@ngxs/storage-plugin": "^3.2.0",
   "@ngxs/store": "^3.1.4",
   "angular-highcharts": "^6.2.6",
   "codemirror": "^5.39.2",
   "core-js": "^2.5.4",
   "download-csv": "^1.1.1",
   "font-awesome": "^4.7.0",
   "hammerjs": "^2.0.8",
   "highcharts": "^6.1.1",
   "ng2-click-outside": "^1.3.3",
   "ng2-completer": "^2.0.8",
   "ng2-dragula": "^2.1.0",
   "ng2-smart-table": "^1.3.5",
   "ngx-bootstrap": "^3.0.1",
   "ngx-toastr": "^8.9.1",
   "rxjs": "^6.0.0",
   "rxjs-compat": "^6.2.1",
   "saturn-datepicker": "^7.0.0",
   "zone.js": "^0.8.26"
 },
 "devDependencies": {
   "@angular-devkit/build-angular": "~0.6.8",
   "@angular/cli": "~7.0.5",
   "@angular/compiler-cli": "^6.0.3",
   "@angular/language-service": "^6.0.3",
   "@types/highcharts": "^5.0.23",
   "@types/jasmine": "~2.8.6",
   "@types/jasminewd2": "~2.0.3",
   "@types/jquery": "^3.3.5",
   "@types/node": "~8.9.4",
   "bootstrap": "^4.1.1",
   "codelyzer": "~4.2.1",
   "jasmine-core": "~2.99.1",
   "jasmine-spec-reporter": "~4.2.1",
   "karma": "~1.7.1",
   "karma-chrome-launcher": "~2.2.0",
   "karma-coverage-istanbul-reporter": "~2.0.0",
   "karma-jasmine": "~1.1.1",
   "karma-jasmine-html-reporter": "^0.2.2",
   "node-cmd": "^3.0.0",
   "protractor": "~5.3.0",
   "ts-node": "~5.0.1",
   "tslint": "~5.9.1",
   "typescript": "~2.7.2",
   "webpack-bundle-analyzer": "^2.13.1"
 }
}



@Laurensvdw
Copy link

Hi 007,
Your versions seem a bit odd to me at the first glance. Try upgrading angular to 7.x and upgrading material as well. Saturn datepicker is on 7.x in your package.json and your material (and other angular libs, besides cdk, are on 6.x), it is a major version so it potentially could break things.

If this does not resolve the problem, please provide the html/ts code which uses the datepicker.

@SaturnTeam
Copy link
Owner

A mug of beer to @Laurensvdw.
Use a 6.x version. 7.0 only for Angular 7.1+

@sandgupta23
Copy link
Author

thanks guys that worked!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants