vlio20 / angular-datepicker

Highly configurable date picker built for Angular applications
https://wondrous-crostata-172891.netlify.app/
MIT License
496 stars 141 forks source link

Metadata version mismatch #343

Closed MerkulovDev closed 6 years ago

MerkulovDev commented 6 years ago

Metadata version mismatch for module /projectFolder/node_modules/ng2-date-picker/index.d.ts, found version 4, expected 3, resolving symbol HistoryModule in /projectFolder/src/app/pages/history/history.module.ts, resolving symbol HistoryModule in /projectFolder/src/app/pages/history/history.module.ts package.json "dependencies": { "@angular/animations": "4.4.5", "@angular/common": "4.4.5", "@angular/compiler": "4.4.5", "@angular/core": "4.4.5", "@angular/forms": "4.4.5", "@angular/http": "4.4.5", "@angular/platform-browser": "4.4.5", "@angular/platform-browser-dynamic": "4.4.5", "@angular/router": "4.4.5", "@ngx-translate/core": "8.0.0", "@ngx-translate/http-loader": "2.0.0", "angular2-jwt": "0.2.3", "angular2-toaster": "4.0.1", "bootstrap": "4.0.0-beta.2", "classlist.js": "1.1.20150312", "core-js": "2.5.1", "element-closest": "2.0.2", "intl": "1.2.5", "moment": "^2.20.1", "ng-sidebar": "6.0.4", "ng2-date-picker": "^2.7.3", "ng2-datepicker": "2.1.6", "ng2-inputmask": "0.2.5", "ng2-webstorage": "1.8.0", "ngx-bootstrap": "2.0.0-beta.8", "rxjs": "5.4.3", "web-animations-js": "2.3.1", "zone.js": "0.8.18" }, "devDependencies": { "@angular/cli": "1.4.7", "@angular/compiler-cli": "4.4.5", "@angular/language-service": "4.4.5", "@types/jasmine": "2.6.0", "@types/jasminewd2": "2.0.3", "@types/node": "8.0.41", "codelyzer": "3.2.1", "jasmine-core": "2.8.0", "jasmine-spec-reporter": "4.2.1", "karma": "1.7.1", "karma-chrome-launcher": "2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.3.0", "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "protractor": "5.1.2", "ts-node": "3.3.0", "tslint": "5.7.0", "typescript": "2.5.3" }

vlio20 commented 6 years ago

I am not sure that I understand the bug. please elaborate

MerkulovDev commented 6 years ago

installed datepicker. imported in module. trying to run project and got this error Metadata version mismatch for module /projectFolder/node_modules/ng2-date-picker/index.d.ts, found version 4, expected 3, resolving symbol...

vlio20 commented 6 years ago

I will need a stackblitz

mdarfilal commented 6 years ago

I got the same error today, when passing node 6.9.4 to 8.9.4 npm 3.10.10 to 5.6.0 Before that worked well

vlio20 commented 6 years ago

Please provide a stackblitz

denispodtykan commented 6 years ago

I have the same error on the version of angular 4.2.4, if I run on 5.2.0 all is well

vlio20 commented 6 years ago

@denispodtykan thanks... If anyone can help with that would be great.

denispodtykan commented 6 years ago

I found a strange way to solve In the folder /node_modules/ng2-date-picker/ I replaced all occurrences of "version": 4 to "version": 3 and it all worked for me, I do not know how right it is

vlio20 commented 6 years ago

It is auto-generated, so we need a more deterministic solution

denispodtykan commented 6 years ago

Of course, therefore, and pointed out that this is not entirely a solution)

Now I tried to change the version from 2.7.3 to 2.6.1 all worked correctly

mdarfilal commented 6 years ago

For information, upgrade angular 4.2.4 to 5.2.1 (latest) ng2-date-picker 2.6.2 to 2.7.3 (latest)

no more problem.

vlio20 commented 6 years ago

The question is: is there a way to make the date picker backward compatible to version less than ng5

uweDuesing commented 6 years ago

@mdarfilal The problem with this approach is that in big complex projects simply upgrading everything is a huge task

uweDuesing commented 6 years ago

I have the same problem and I agree with vlio20, the date picker needs to be backwards compatible.

MerkulovDev commented 6 years ago

I cant upgrade angular to v5 because a have many modules and there dependencies that would not work on v5.

vlio20 commented 6 years ago

@MerkulovDev please use version 2.6.2

MerkulovDev commented 6 years ago

yes. i've tried 2.6.2 but some options is not working like 'firstDayOfWeek' and 'unSelectOnClick'. i will try 2.6.2 now

MerkulovDev commented 6 years ago

in 2.6.2 everything is worse Type '{ firstDayOfWeek: "mo"; monthFormat: string; disableKeypress: false; allowMultiSelect: false; clo...' is not assignable to type 'IDatePickerConfig'.

vlio20 commented 6 years ago

@MerkulovDev, please open a different issue, and provide a stackblitz for the issue that you are having 2.6.2

vlio20 commented 6 years ago

@MerkulovDev , @uweDuesing, @mdarfilal , @denispodtykan I have just deployed 2.7.4-alpha version could you please try it out and let me know if it works for?

nitinsh99 commented 6 years ago

I was also getting this error which seem to have been resolved for me in 2.7.4-alpha.

ERROR in Error: Metadata version mismatch for module .node_modules/ng2-date-picker/index.d.ts, found version 4, expected 3, Thank you for fixing this.

vlio20 commented 6 years ago

@nitinsh99 thanks. I will wait for few more replies and will publish a stable version

vlio20 commented 6 years ago

@MerkulovDev , @uweDuesing, @mdarfilal , @denispodtykan any updates?

mdarfilal commented 6 years ago

@vlio20 Since this issue I updated my angular/node/date-picker version to latest. I just tried the version 2.7.4-alpha, results as follow :

vlio20 commented 6 years ago

Awesome, will make a new release soon

vlio20 commented 6 years ago

should be fixed in 2.7.4