version 9.0.0 Cannot read property 'kind' of undefined
daustany opened this issue · comments
I'm recently upgrade to version 9.0.0 but when doing production build I get below error:
after some researching I found some suggestion about installing IVY, but I'm trying do get success build without installing third-party.
ERROR in ./node_modules/ngx-dropzone-wrapper/fesm5/ngx-dropzone-wrapper.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 (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:230:35)
at checkNodeForDecorators (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:53:21)
at visitNodes (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16631:30)
at Object.forEachChild (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16857:24)
at checkNodeForDecorators (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:44:31)
at visitNode (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16622:24)
at Object.forEachChild (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16752:21)
at checkNodeForDecorators (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:44:31)
at visitNode (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16622:24)
at Object.forEachChild (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16809:24)
at checkNodeForDecorators (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:44:31)
at visitNode (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16622:24)
at Object.forEachChild (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16820:24)
at checkNodeForDecorators (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:44:31)
at visitNode (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16622:24)
at Object.forEachChild (D:\Developing\NETCore\Dobarg\angular\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16716:21)
Any update? i have the same error
Actually this version of ngx-dropzone-wrapper upgraded to Angular 9 as its version.
So, in Angular 9, a compiler newly added named IVY.
You have two option, upgrade whole your project to Angular 9 or use ngx-dropzone-wrapper older version.
To upgrade your project to Angular 9 use this link:
https://www.techiediaries.com/angular/upgrade-angular-8-7-to-angular-9-with-cli-ng-update/
And to use "ngx-dropzone-wrapper" older version (8) use:
https://www.npmjs.com/package/ngx-dropzone-wrapper/v/8.0.0
I dont know if update angular is a good idea. I have a large project and the incompatibility risk is high. I solved the problem updating the @angular-devkit/build-angular in packages.json
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.20"
}