Angular Ivy inner class declaration
dexster opened this issue · 5 comments
dexster commented
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
- clone this repo.
- ng update @angular/core@8 @angular/cli@8 in cli-example folder
- ng update @angular/core @angular/cli --next in cli-example folder
- add main.playground.ts to files section in tsconfig.app.json in cli-example folder
- 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
Arnaud73 commented
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.
custompro12 commented
Seeing the same issue. Can't use Angular Playground with Angular 9
jrdutton commented
I'm also seeing this issue
digovc commented
ElderOrb commented
I've managed to workaround the issue by using this:
"angularCompilerOptions": {
"enableIvy": false, /* for playground */
}