ERROR in ./node_modules/ng2-pdf-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 (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\src\transforms\scrub-file.js:265:35) at checkNodeForDecorators (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\src\transforms\scrub-file.js:77:21) at visitNodes (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16144:30) at Object.forEachChild (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16370:24) at checkNodeForDecorators (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31) at visitNode (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24) at Object.forEachChild (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16265:21) at checkNodeForDecorators (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31) at visitNode (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24) at Object.forEachChild (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16322:24) at checkNodeForDecorators (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31) at visitNode (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24) at Object.forEachChild (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16333:24) at checkNodeForDecorators (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31) at visitNode (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16135:24) at Object.forEachChild (E:\Mohamed Mostafa Work\new_project\reservation\node_modules@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16229:21)
I got same error but finally resolved with following solution.. Unistall ng2-pdf-viewer viewer first then install - npm install [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With