ngx-mat-select-search: [BUG] Cannot build project with ngx-mat-select-search@2.0.0
Hi, I’m unable to build with the latest version of ngx-mat-select-search@2.0.0
I’m using ng build --prod --vendor-chunk
but ng serve
works fine, might be something with aot.
Rollbacking to 1.8.0 made the build works again.
Versions (ng version)
Angular CLI: 8.3.4
Node: 12.8.1
OS: win32 x64
Angular: 8.2.6
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.803.4
@angular-devkit/build-angular 0.803.4
@angular-devkit/build-optimizer 0.803.4
@angular-devkit/build-webpack 0.803.4
@angular-devkit/core 8.3.4
@angular-devkit/schematics 8.3.4
@angular/cdk 8.2.0
@angular/cli 8.3.4
@angular/material 8.2.0
@angular/material-moment-adapter 8.2.0
@ngtools/webpack 8.3.4
@schematics/angular 8.3.4
@schematics/update 0.803.4
rxjs 6.5.3
typescript 3.5.3
webpack 4.39.2
Stack trace
ERROR in ./node_modules/ngx-mat-select-search/fesm2015/ngx-mat-select-search.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 (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:230:35)
at checkNodeForDecorators (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:53:21)
at visitNodes (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:16631:30)
at Object.forEachChild (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:16859:24)
at transformer (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:39:16)
at transformSourceFileOrBundle (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:67384:57)
at transformation (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:83586:24)
at transformRoot (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:83606:82)
at Object.map (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:499:29)
at Object.transformNodes (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:83593:30)
at emitJsFileOrBundle (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:84089:32)
at emitSourceFileOrBundle (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:84043:13)
at forEachEmittedFile (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:83832:34)
at Object.emitFiles (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:84026:9)
at emitWorker (/var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:89951:33)
at /var/atlassian/bamboo-agent-home/xml-data/build-dir/EASYNAV-NW-GCA/node_modules/typescript/lib/typescript.js:89912:66
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! easynav_cs@1.5.0 build:prod: `ng build --prod --vendor-chunk`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the easynav_cs@1.5.0 build:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/bambooagent/.npm/_logs/2019-10-21T23_09_50_639Z-debug.log
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 15 (5 by maintainers)
Alternatively, you could use ngx-mat-select-search version 1.8.0 for the time being
@macjohnny, tried This afternoon with @angular/core@latest and @angular-devkit/build-angular@latest and it finally works with ng build --prod ! Thanks again
Downgrade from 2.1.1 to 1.8.0 worked for me thanks a lot You saved my day
@macjohnny i tried to downgrade to version 1.8.0 and its working now, thanks guys 😃
@JoAlgorithm I suggest you to update to angular 6, or at least get the latest versions within the 5.x branch. Please note that ngx-mat-select-search 1.8.0 is the last version that is compatible with angular 5.x
Thanks for the quick reply @macjohnny, didn’t see that a similar issue has been posted earlier. Will check the fix soon.