Closed eni9889 closed 4 years ago
I also have an error during ng build with --prod
flag:
node_modules/ng2-daterangepicker/lib/daterangepicker/daterangepicker.module.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of AdminModule, but could not be resolved to an NgModule class
1 export declare class Daterangepicker {
I am in the process of upgrading the package to angular 9 and the latest version of daterangepicker. Should have a testable version in the next couple of days
https://github.com/evansmwendwa/ng2-daterangepicker/commit/11bdc18aa5c1879375719d8f7cfb0eab16bac461
@evansmwendwa sorry to be a bother but is there an ETA or is there anything I can help with?
@eni9889 a beta release is available. Kindly test and share feedback
npm install ng2-daterangepicker@3.0.0-beta.1
Refer to the link below for setup instructions and add a comment if you encounter any challenges.
https://github.com/evansmwendwa/ng2-daterangepicker/blob/ng9-support/README.md
@evansmwendwa , thanks for the efforts. But it doesn't seem to work. I get this error in console when trying to render daterange picker component which worked in previous versions:
core.js:5845 ERROR Error: Cannot find a differ supporting object 'undefined'
at KeyValueDiffers.find (core.js:29607) [angular]
at new DaterangepickerComponent (ng2-daterangepicker.js:30) [angular]
at NodeInjectorFactory.DaterangepickerComponent_Factory [as factory] (ng2-daterangepicker.js:106) [angular]
at getNodeInjectable (core.js:5615) [angular]
at instantiateAllDirectives (core.js:12662) [angular]
at createDirectivesInstances (core.js:11898) [angular]
at ɵɵelementStart (core.js:20961) [angular]
at DaterangeComponent_Template (template.html:1) [angular]
It happens in the DaterangepickerComponent constructor, on its last line. Ivy pre-compiles the component file using ngcc tool, and the error happens on this line in webpack:////home/user/my-project/node_modules/ng2-daterangepicker/__ivy_ngcc__/fesm2015/ng2-daterangepicker.js
:
this._differ['settings'] = this.differs.find(this.config.settings).create();
this.config.settings
is undefined, hence the errorAnd then there's also this weird error:
core.js:5845 ERROR Error: ASSERTION ERROR: Reached the max number of directives [Expected=> 5 != 5 <=Actual]
Is anybody getting the same?
@agrinko can you try the latest beta and let me know if it fixes that issue
npm install ng2-daterangepicker@3.0.0-beta.2
@evansmwendwa now it actually works, no errors in console. But it doesn't have styles, perhaps I did something wrong.
In your readme you mention that I need to attach "daterangepicker.css" file to the styles array in angular.json
, but where do I get that file? I don't see any CSS files in node_modules/ng2-daterangepicker
, where do I get it from? And how did it work before, in previous versions? I didn't include any special styles in angular.json for daterangepicker, I guess
I have updated the documentation and packaged the relevant stylesheet that needs to be imported under styles in angular.json
Kindly refer to the latest release and updated documentation.
The latest version has also been released without a beta tag but backwards compatibility is not guaranteed. The docs should have all the necessary steps.
npm install ng2-daterangepicker
Thank you @evansmwendwa , it is working now! We can close the issue
Got this when updated to Angular 9. The issue seems to be with the date range picker module. Anyone else experience this and or have a possible solution?