NileshPatel17 / ng-multiselect-dropdown

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

ng build --prod - TypeError: Cannot read property 'kind' of undefined #192

Open neuronraptor opened 4 years ago

neuronraptor commented 4 years ago

Angular version: 8.2.14 ng-multiselect-dropdown version: 0.2.10

Description of issue: Needs to build for production, but fails ERROR in ./node_modules/ng-multiselect-dropdown/fesm2015/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

Steps to reproduce: ng build --prod

Expected result: Successful build

Actual result: build failed

naveenksamala commented 4 years ago

I too get the below error for below version: angular- 7.3.9 ng-multiselect-dropdown- 0.2.10

ERROR in ./node_modules/ng-multiselect-dropdown/fesm2015/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 at isAngularDecoratorMetadataExpression…...

rubysown commented 4 years ago

Take a look at #178 (same issue). A downgrade will resolve the issue if you aren't using anything specific to the newer versions. I downgraded from 0.2.9 -> 0.2.6 and it fixed my build issues.

naveenksamala commented 4 years ago

Yes, downgrading to version 0.2.3 worked for me. 0.2.6 and 0.2.10 both did not work with angular 7.3.9.

ottokruse commented 4 years ago

Same issue here. 0.2.3 works

neuronraptor commented 4 years ago

Same issue here. 0.2.3 works

I successfully got rid of this issue by excluding all test dependencies and now it works as am intended even under angular 9.0.3. Finally, I took the latest version 0.2.10 and cut off all test dependencies. That's it! :)

finrojo commented 4 years ago

How did you remove the test dependencies?

anshumandikshit commented 4 years ago

This is the exact error I am getting in my angular 7 application .I tried to downgrade to 0.2.3 but still the same error showing to me ..Any leads will be very helpful .

jltrevizon commented 4 years ago

This is the exact error I am getting in my angular 7 application .I tried to downgrade to 0.2.3 but still the same error showing to me ..Any leads will be very helpful .

me too, same error 0.2.3, 0.2.4 dont work

naveenksamala commented 4 years ago

@jltrevizon, @anshumandikshit, give this a try, delete node_modules and package-lock.json, do a npm install and build the project. npm install will do a clean install of all packages and also creates a new package-lock.json. See if this fixes the issue you are facing.

mdsaddam777 commented 4 years ago

what to downgrade to 0.2.3,as i am new i dont have much idea of these.please help

Nitin-Daddikar commented 4 years ago

To solve this remove the caret ^ symbol ie "ng-multiselect-dropdown": "^0.2.3" to "ng-multiselect-dropdown": "0.2.3" OR "ng-multiselect-dropdown": "^0.2.4" to "ng-multiselect-dropdown": "0.2.4"

shahidaumar commented 4 years ago

what to downgrade to 0.2.3,as i am new i dont have much idea of these.please help

https://www.npmjs.com/package/ng-multiselect-dropdown/v/0.2.3

BasirBaidya commented 4 years ago

"ng-multiselect-dropdown": "^0.2.10", "@angular-devkit/build-angular": "~0.801.2" I have faced this issue with above version.

Solved by installing this version --> npm i @angular-devkit/build-angular@0.803.24.

nirolivier commented 4 years ago

Just remove the caret as mentioned by @Nitin-Daddikar. Thanks

ekamnh commented 3 years ago

Same issue here. 0.2.3 works

Hi, I have tried this same in my angular 7 App but not works

can you help

toastyghost commented 2 years ago

I'm on Angular 7 and was able to get it to build by pinning version to 0.2.5