matheo / angular

Open Source Angular Libraries: MatDataSource, MatDatepicker
http://matheo.co/demos/
MIT License
60 stars 15 forks source link

Angular 9 issue: "export 'coerceStringArray' was not found in '@angular/cdk/coercion' #25

Closed shadyabouelmakarem closed 3 years ago

shadyabouelmakarem commented 3 years ago

Error when running "ng serve" using Angular 9.1.13

I followed the docs on how to install and use it, but when I try to serve the application I get this error:

ERROR in ./node_modules/@matheo/datepicker/fesm2015/matheo-datepicker.js 3344:27-44
"export 'coerceStringArray' was not found in '@angular/cdk/coercion'

Minimal Reproduction

  1. Run: npm install @matheo/datepicker
  2. import modules to app.module.ts:

    import { MatDatepickerModule } from '@matheo/datepicker'; import { MatNativeDateModule } from '@matheo/datepicker/core';

    @NgModule({ imports: [ MatNativeDateModule, MatDatepickerModule, ... ], ... }) export class AppModule {}

  3. use the component in the HTML

<input matInput [matDatepicker]="picker"/> <mat-datepicker-toggle matSuffix [for]="picker"> <mat-datepicker type="datetime" #picker>

Expected behavior

The app is served without errors and the component works.

Your Environment

9.1.13


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 9.1.15
Node: 14.17.0
OS: win32 x64

Angular: 9.1.13
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.15
@angular-devkit/build-angular     0.901.15
@angular-devkit/build-optimizer   0.901.15
@angular-devkit/build-webpack     0.901.15
@angular-devkit/core              9.1.15
@angular-devkit/schematics        9.1.15
@angular/cdk                      9.2.4
@angular/cli                      9.1.15
@angular/material                 9.2.4
@ngtools/webpack                  9.1.15
@schematics/angular               9.1.15
@schematics/update                0.901.15
rxjs                              6.5.5
typescript                        3.8.3
webpack                           4.42.0

matheo commented 3 years ago

Hi @shadyabouelmakarem unfortunately I've forked this datepicker from Angular Material v11 and it doesn't support prior versions, only 11+ :(