Open ChristopheLej opened 3 years ago
There was an issue. its fixed now with v0.3.1 and 0.2.13
On adding in tsconfig.app.json: "angularCompilerOptions": { "enableIvy": true }
I got this error:
ERROR in No suitable injection token for parameter 'listFilterPipe' of class 'MultiSelectComponent'. no type or decorator npm ERR! code ELIFECYCLE npm ERR! errno 1
I installed the last version "ng-multiselect-dropdown": "^0.3.7",
Angular version: 10.0.8 ng-multiselect-dropdown version: ^0.2.10 Description of issue: Error when building: Error: Failed to compile entry-point ng-multiselect-dropdown (es2015 as esm2015) due to compilation errors: node_modules/ng-multiselect-dropdown/fesm2015/ng-multiselect-dropdown.js:28:17 - error NG2003: No suitable injection token for parameter 'listFilterPipe' of class 'MultiSelectComponent'. Consider adding a type to the parameter or use the @Inject decorator to specify an injection token. 28 constructor(listFilterPipe) {
node_modules/ng-multiselect-dropdown/fesm2015/ng-multiselect-dropdown.js:417:24 - error NG6001: The class 'MultiSelectComponent' is listed in the declarations of the NgModule 'NgMultiSelectDropDownModule', but is not a directive, a component, or a pipe. Either remove it from the NgModule's declarations, or add an appropriate Angular decorator. 417 declarations: [MultiSelectComponent, ClickOutsideDirective, ListFilterPipe],
node_modules/ng-multiselect-dropdown/fesm2015/ng-multiselect-dropdown.js:417:46 - error NG6001: The class 'ClickOutsideDirective' is listed in the declarations of the NgModule 'NgMultiSelectDropDownModule', but is not a directive, a component, or a pipe. Either remove it from the NgModule's declarations, or add an appropriate Angular decorator. 417 declarations: [MultiSelectComponent, ClickOutsideDirective, ListFilterPipe],
node_modules/ng-multiselect-dropdown/fesm2015/ng-multiselect-dropdown.js:27:5 - error NG6003: Appears in the NgModule.exports of NgMultiSelectDropDownModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class. Is it missing an Angular annotation? 27 let MultiSelectComponent = class MultiSelectComponent {
Solution: I limit the version of library to 0.2.12. in package.json : "ng-multiselect-dropdown": "0.2.12" From version 0.2.13, I have the bug.
Finally, I use version ^0.3.1 which seems compatible with my dev.
Thanks