Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 8 --prod build issue #6

Open
dkruchok opened this issue Apr 1, 2020 · 1 comment
Open

Angular 8 --prod build issue #6

dkruchok opened this issue Apr 1, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dkruchok
Copy link

dkruchok commented Apr 1, 2020

An error when I run ng build --prod

ERROR in ./node_modules/ngx-cookie-banner/fesm2015/ngx-cookie-banner.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 (/app/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:265:35)
    at checkNodeForDecorators (/app/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:77:21)
    at visitNodes (/app/node_modules/typescript/lib/typescript.js:16514:30)
    at Object.forEachChild (/app/node_modules/typescript/lib/typescript.js:16740:24)
    at checkNodeForDecorators (/app/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNode (/app/node_modules/typescript/lib/typescript.js:16505:24)
    at Object.forEachChild (/app/node_modules/typescript/lib/typescript.js:16635:21)
    at checkNodeForDecorators (/app/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNode (/app/node_modules/typescript/lib/typescript.js:16505:24)
    at Object.forEachChild (/app/node_modules/typescript/lib/typescript.js:16703:24)
    at checkNodeForDecorators (/app/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNode (/app/node_modules/typescript/lib/typescript.js:16505:24)
    at Object.forEachChild (/app/node_modules/typescript/lib/typescript.js:16692:24)
    at checkNodeForDecorators (/app/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:68:31)
    at visitNode (/app/node_modules/typescript/lib/typescript.js:16505:24)
    at Object.forEachChild (/app/node_modules/typescript/lib/typescript.js:16599:21)

packages.json
`

"@angular-devkit/core": "^8.3.20",
"@angular-devkit/schematics": "^8.3.20",
"@angular/animations": "^8.2.14",
"@angular/cdk": "^8.1.1",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"@angular/core": "^8.2.14",`

This issue doesn't appear if I run it with ng build --prod --build-optimizer=false
But that's not a solution =)

@evolkmann evolkmann self-assigned this Apr 22, 2020
@evolkmann evolkmann added the bug Something isn't working label Apr 22, 2020
@evolkmann
Copy link
Contributor

Hi @dkruchok, please excuse the late reply, I was not notified about the issue (will set that up now ..). I did not encounter the issue, although I am only using it with Angular 9 projects.

Can you please shortly inform me if this is still an issue for you? If so, I am happy to try it out with an ng8 project. Of course, the workaround you mention is not a solution.

Thanks, Enzo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants