SoCreate/angular-playground

Angular Ivy inner class declaration

dexster opened this issue · 5 comments

Versions

v6.1.2
Angular CLI: 9.0.0-rc.10
Node: 12.3.1
OS: darwin x64

Angular: 9.0.0-rc.10
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.10
@angular-devkit/build-angular     0.900.0-rc.10
@angular-devkit/build-optimizer   0.900.0-rc.10
@angular-devkit/build-webpack     0.900.0-rc.10
@angular-devkit/core              9.0.0-rc.10
@angular-devkit/schematics        9.0.0-rc.10
@ngtools/webpack                  9.0.0-rc.10
@schematics/angular               9.0.0-rc.10
@schematics/update                0.900.0-rc.10
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

Repro steps

  1. clone this repo.
  2. ng update @angular/core@8 @angular/cli@8 in cli-example folder
  3. ng update @angular/core @angular/cli --next in cli-example folder
  4. add main.playground.ts to files section in tsconfig.app.json in cli-example folder
  5. build and run

Observed Behavior

ERROR in getInternalNameOfClass() called on a non-ES5 class: expected UrlService to have an inner class declaration

Desired Behavior

App builds successfully and playground is available

Any other details that may be useful (optional)

I cloned this repo, tried to find the cause by removing UrlService calls in AppComponent.ts. Once I had removed all references to UrlService I got the same error message but now referring to AppComponent

ERROR in getInternalNameOfClass() called on a non-ES5 class: expected AppComponent to have an inner class declaration

This problem also occurs with Angular 9.0.1.
It happens sooner if you add ngcc as a postinstall script : it occurs while compiling angular-playground after installing all NPM modules.

Seeing the same issue. Can't use Angular Playground with Angular 9

I'm also seeing this issue

Same here after update my library to Angular 9.

image

I've managed to workaround the issue by using this:

"angularCompilerOptions": {
"enableIvy": false, /* for playground */
}