chikor.net
chikor.net

Reputation: 387

Error: Internal error: unknown identifier

I want to publish my angular application for production, when i run

ng build --prod --aot = false

it builds successfully, but the main.js file is large(6 MB), same with vendor.js (10 mb), which make my application so slow. So i tried running with ng build --prod, but i get this error

ERROR in : Error: Internal error: unknown identifier [{"filePath":"C:/Users/myuser/Documents/anular-app/angularpp_test/Client/myweb/node_modules/@angular/core/core.d.ts","name":"ErrorHandler","members":[]}]

this is my configuration

Angular CLI: 6.0.7
Node: 8.9.4
OS: win32 x64
Angular: 5.2.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... http, language-service, material, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.7
@angular-devkit/build-angular     0.6.7
@angular-devkit/build-optimizer   0.6.7
@angular-devkit/core              0.3.1
@angular-devkit/schematics        0.6.7
@angular/cli                      6.0.7
@angular/flex-layout              2.0.0-beta.10
@ngtools/webpack                  6.0.7
@schematics/angular               0.6.7
@schematics/update                0.6.7
rxjs                              5.5.2
typescript                        2.4.2
webpack                           4.8.3

Upvotes: 0

Views: 2130

Answers (1)

João Vinicius
João Vinicius

Reputation: 21

Look in your app.modules, specifically where your provider. Must be using a

provide: [ErroHandler]

Remove this brackets.

Upvotes: 2

Related Questions