0
votes

In previous system worked properly but when clone the project in new system so now i am getting this errors.

I have also tried to change(downgrade) "ng-select2": "^1.1.2", to "ng-select2": "1.1.2"

i am trying to solve and make build from 2 days but getting same issue no solution
anyone can help? but getting same errors.

When i make build run command ( ng build --prod ) get this errors

Angular CLI: 8.0.6

Node: 10.16.0

OS: win32 x64

Angular: 8.0.3

dependencies

..............

"ng-select2": "^1.1.2",

"ng-select2-component": "^7.1.5",

Packages:

@angular-devkit/architect 0.800.6

@angular-devkit/build-angular 0.800.6

@angular-devkit/build-optimizer 0.800.6

@angular-devkit/build-webpack 0.800.6

@angular-devkit/core 8.0.6

@angular-devkit/schematics 8.0.6

@angular/animations 8.2.14

@angular/cli 8.0.6

@angular/platform-browser 8.2.14

@ngtools/webpack 8.0.6

@schematics/angular 8.0.6

@schematics/update 0.800.6

rxjs 6.4.0

typescript 3.4.5

webpack 4.30.0

Complete Errors:

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

1
Yes different from those questionsSiraj Ali
Have you tried updating your dependencies? One of the answers to these questions says that an old typescript version (like yours) was the problemA_A

1 Answers

0
votes

I have find solution of this errors.

solved by change the buildOptimizer: fale in angular.json file.

Just Change

buildOptimizer: true

To

buildOptimizer: fale

worked for me