Cordobo / angularx-qrcode

A fast and easy-to-use Angular QR Code Generator library with Ivy support
https://cordobo.github.io/angularx-qrcode/
MIT License
473 stars 126 forks source link

TypeError: Cannot read property 'kind' of undefined #67

Closed mohamedaboelmagd closed 4 years ago

mohamedaboelmagd commented 4 years ago

ng build -c dev --output-hashing none

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

Cordobo commented 4 years ago

@mohamedaboelmagd Could you please provide more information about your dev configuration (I have none in my workspace) as a sample repo where I can reproduce the error? I can compile an app with the latest version (angularx-qrcode 2.1.0) without running into this error.

As suggested on a SO thread, it might as well be an issue with the local angular installation, did you try these? https://stackoverflow.com/questions/53827570/typeerror-cannot-read-property-kind-of-undefined-at-getassignmenttargetkind

Closing for now as not reproducible

Cordobo commented 4 years ago

Solution is to update your projects devDependencies, see here https://github.com/Cordobo/angularx-qrcode/issues/69#issuecomment-570048426