zefoy / ngx-perfect-scrollbar

Angular wrapper library for the Perfect Scrollbar
MIT License
522 stars 116 forks source link

webPack: TypeError: Cannot read property 'kind' of undefined #283

Open ohabash opened 4 years ago

ohabash commented 4 years ago

I am using ngx-font-picker. when i installed it in angular and tried to compile with webpack I get the following error

ERROR in ./node_modules/ngx-perfect-scrollbar/fesm5/ngx-perfect-scrollbar.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 (/Users/omar/Dropbox/Sites/ZaynTek/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:265:35)

ngx-font-picker is using this

"ngx-perfect-scrollbar": "^9.0.0",

this is my env

Angular CLI: 7.3.9
Node: 10.16.3
OS: darwin x64
Angular: 7.2.16
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.9
@angular-devkit/build-angular     0.13.9
@angular-devkit/build-optimizer   0.13.9
@angular-devkit/build-webpack     0.13.9
@angular-devkit/core              7.3.9
@angular-devkit/schematics        7.3.9
@angular/cli                      7.3.9
@angular/fire                     5.0.0
@ngtools/webpack                  7.3.9
@schematics/angular               7.3.9
@schematics/update                0.13.9
rxjs                              6.3.3
typescript                        3.2.4
webpack                           4.42.0

does anyone know what i can do to get ngx-perfect-scrollbar to compile?

agap2-ag commented 4 years ago

I leave my report and also reported this issue in the MDB perfect scrollbar (932), since it might not just be related to this plugin:

While building (similar to another TypeError issue on MDB perfect scrollbar: 762):

ERROR in ./node_modules/ngx-perfect-scrollbar/fesm5/ngx-perfect-scrollbar.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 (/project_path/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:230:35)
at checkNodeForDecorators (/project_path/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:53:21)
at visitNodes (/project_path/node_modules/typescript/lib/typescript.js:16631:30)
at Object.forEachChild (/project_path/node_modules/typescript/lib/typescript.js:16857:24)
at checkNodeForDecorators (/project_path/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNode (/project_path/node_modules/typescript/lib/typescript.js:16622:24)
at Object.forEachChild (/project_path/node_modules/typescript/lib/typescript.js:16752:21)
at checkNodeForDecorators (/project_path/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNode (/project_path/node_modules/typescript/lib/typescript.js:16622:24)
at Object.forEachChild (/project_path/node_modules/typescript/lib/typescript.js:16809:24)
at checkNodeForDecorators (/project_path/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNode (/project_path/node_modules/typescript/lib/typescript.js:16622:24)
at Object.forEachChild (/project_path/node_modules/typescript/lib/typescript.js:16820:24)
at checkNodeForDecorators (/project_path/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNode (/project_path/node_modules/typescript/lib/typescript.js:16622:24)
at Object.forEachChild (/project_path/node_modules/typescript/lib/typescript.js:16716:21)

error Command failed with exit code 1.