NileshPatel17 / ng-multiselect-dropdown

Multiple Select Dropdown Component
https://nileshpatel17.github.io/ng-multiselect-dropdown/
326 stars 287 forks source link

Prod build error #178

Open JitMondal opened 4 years ago

JitMondal commented 4 years ago

In our project we have included ng-multiselect-dropdown while following the guidelines mentioned at here.

If we go for a dev build, it seems to work fine. But if we go for a prod build it always gives me a error like mentioned below: ERROR in ./node_modules/ng-multiselect-dropdown/fesm5/ng-multiselect-dropdown.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): TypeError: Cannot read property 'kind' of undefined

Can you please help me on this.

Ximaxe commented 4 years ago

We have the same problem here. We are blocked by this issue.

Etu34041 commented 4 years ago

Yes, I have the same issue.

NileshPatel17 commented 4 years ago

are you using angular cli or custom webpack build? please provide more details such as angular version etc.

Etu34041 commented 4 years ago

Here are the main info:

Angular CLI: 7.0.4
Node: 10.16.3
OS: win32 x64
Angular: 7.0.4
... animations, cli, common, compiler, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version


@angular-devkit/architect 0.13.9
@angular-devkit/build-angular 0.13.9
@angular-devkit/build-optimizer 0.13.9
@angular-devkit/build-webpack 0.13.9
@angular-devkit/core 7.0.4
@angular-devkit/schematics 7.0.4
@angular/compiler-cli 7.2.15
@ngtools/webpack 7.3.9
@schematics/angular 7.0.4
@schematics/update 0.10.4
rxjs 6.5.3
typescript 3.1.6
webpack 4.29.0

NileshPatel17 commented 4 years ago

ng-multiselect-dropdown version??

Etu34041 commented 4 years ago

2.0.4 but tried with 2.0.6 and had the same issue.

Etu34041 commented 4 years ago

Sorry was meaning 0.2.4 and 0.2.6

NileshPatel17 commented 4 years ago

with which version it worked earlier?

Etu34041 commented 4 years ago

New project so, encore, it was working with a non prod build with the same version. Yesterday we just tried the first prod build and had this issue.

NileshPatel17 commented 4 years ago

I would recommend to update angular to version 8. This issue has nothing to do with this ng-multiselect-dropdown component. i think, its has something to do with typescript version.

JitMondal commented 4 years ago

Changing to angular version 8 requires a lot of changes at the server side along with other module dependencies. Can't we accommodate any fixes in the version 7.1.4?

gvenkatsai93 commented 4 years ago

@NileshPatel17 can you please help me with this error

ERROR in ./node_modules/ng-multiselect-dropdown/fesm5/ng-multiselect-dropdown.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): TypeError: Cannot read property 'kind' of undefined

dbonetta commented 4 years ago

Hello, I have temporarily solved setting the version of ng-multiselect-dropdown to 0.2.3.

AsifulNobel commented 4 years ago

Downgrading to 0.2.3 seems to fix the error for me as well. Thanks @dbonetta .

prakashb commented 4 years ago

0.2.3 seems to fix the error for me as well. Thanks @dbonetta

Trixt0r commented 4 years ago

Update @angular-devkit/build-angular to the latest version. The error is caused there.

npm install @angular-devkit/build-angular@latest
NileshPatel17 commented 4 years ago

I was able to build successfully with below config:- image

Trixt0r commented 4 years ago

It works because your package @angular-devkit/build-angular is up.

rgdick11 commented 4 years ago

I've hit this same issue in my project building with buildOptimizer turned on using ng-multiselect-dropdown v0.2.6. Downgrading to 0.2.5 seems to work for me. Turning off buildOptimizer also works (but that's not ideal). The issue started occurring the same day 0.2.6 was released and I haven't touched any of my other node/angular settings.

Angular CLI: 7.3.9
Node: 10.16.3
OS: darwin x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.11.4
@angular-devkit/build-angular      0.11.4
@angular-devkit/build-optimizer    0.11.4
@angular-devkit/build-webpack      0.11.4
@angular-devkit/core               7.1.4
@angular-devkit/schematics         7.3.9
@angular/cdk                       7.3.7
@angular/cli                       7.3.9
@angular/material                  7.3.7
@angular/material-moment-adapter   7.3.7
@ngtools/webpack                   7.1.4
@schematics/angular                7.3.9
@schematics/update                 0.13.9
rxjs                               6.5.3
typescript                         3.2.4
webpack                            4.23.1
Praveen0123 commented 4 years ago

Hello, I have temporarily solved setting the version of ng-multiselect-dropdown to 0.2.3.

thanks it work for me

Arios509 commented 4 years ago

Update @angular-devkit/build-angular and using the latest version of the ng-multiselect-dropdown 0.2.10 is working for me.

ItsasoAguirre commented 4 years ago

with "ng-multiselect-dropdown": "^0.2.10", and "@angular-devkit/build-angular": "^0.803.23" the script ng build --prod --base-href /fefe/ don`t work

this is the error: ERROR in node_modules/ng-multiselect-dropdown/ng-multiselect-dropdown.d.ts.MultiSelectComponent.html(5,103): Object is possibly 'undefined'.

adap-developer02 commented 4 years ago

@NileshPatel17

Hi I am facing this issue when I am using this control 2 times . One for Category Second for Product. ..Attach is image where you will see if I select any of item, it will affecting to others as well.

  1. This image just show 2 control i have just added. image

  2. This image has actuall issue. image