Cannot read property 'kind' of undefined` - Potential Memory Leak?
See original GitHub issueDescribe the bug
Hi Matt Lewis,
I seem to be getting the following issue when building my angular 7 application for production:
ERROR in ./node_modules/angular-calendar/fesm5/angular-calendar.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): TypeError: Cannot read property 'kind' of undefined
I have tried the following:
upgraded to the latest version of angular-calendar from v0.28.5
to v0.28.15
increased the memory allocation by using node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng build --prod
Here are our details
We are using angular CLI version v8.0.2
node version v10.1.6
Full Error:
ERROR in ./node_modules/angular-calendar/fesm5/angular-calendar.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 (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file .js:265:35) at checkNodeForDecorators (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:77:21) at visitNodes (c:\WorkspaceXXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16144:30) at Object.forEachChild (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js: 16370:24) at checkNodeForDecorators (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31) at visitNode (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24) at Object.forEachChild (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js: 16265:21) at checkNodeForDecorators (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31) at visitNode (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24) at Object.forEachChild (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js: 16322:24) at checkNodeForDecorators (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31) at visitNode (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24) at Object.forEachChild (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js: 16333:24) at checkNodeForDecorators (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31) at visitNode (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24) at Object.forEachChild (c:\Workspace\XXX\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js: 16229:21)
Minimal reproduction of the problem with instructions
ng build --prod
on the application angular-calendar
is on
Screenshots
N/A
Versions
@angular/core
: 7.1.0angular-calendar
: 0.28.15- Browser name and version: N/A
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:9 (3 by maintainers)
Top GitHub Comments
Thanks Matt! thanks for the quick turnaround on this!
Thanks for putting together that repo, it really helped. I found the issue and a workaround, so this should be fixed now in
0.28.16
😄