Angular Prod Build Failure: Cannot read property 'kind' of undefined
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [x] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
Angular version: 8.0.2 ng2-pdf-viewer version: 6.1.2
When doing ng build
everything works, but when trying to do ng build --prod
I get this error:
ERROR in ./node_modules/ng2-pfd-viewer/fesm5/ng2-pdf-viewer.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:\Projects\test_project\node_modules@angular-devkit\build-optimizer\src\transforms\scrub-file.js:77:21)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:9
Top Results From Across the Web
TypeError: Cannot read property 'kind' of undefined at ...
I ran into this issue, and it turns out that @angular-devkit/build-angular was ...
Read more >ERROR in Cannot read property 'kind' of undefined - Angular ...
ERROR in Cannot read property 'kind' of undefined. The error shows up in the terminal at the end of the compilation process and...
Read more >Toolips ng build –prod error - MDBootstrap
when I was trying to build production of my project we got this error: in Error: TypeError: Cannot read property 'kind' of undefined...
Read more >angular-cli - Cannot read property 'kind' of undefined - iTecNote
if I build with not --prod I do not get any error. Full error: ERROR in TypeError: Cannot read property 'kind' of undefined...
Read more >angular/angular-cli - Gitter
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): TypeError: Cannot read property 'kind' of ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Downgrading to v5.3.4 worked for me
npm uninstall ng2-pdf-viewer
thennpm install ng2-pdf-viewer@5.3.4
After searching for a long time, this worked for me. Upgraded @angular-devkit/build-angular to version: “~0.803.19” and then prod build worked fine. Made the following change in package.json. ` “devDependencies”: {
… } `