TypeError: Cannot assign to read only property 'tView' of object '[object Object]' with Ivy
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/coreIs this a regression?
Yes, the previous version in which this bug was not present was: 8.2.14Description
I have upgrade from latest v8.2.14
to v9 rc11
and I have this error, it seems that tView
property is created as non-writtableβ¦
π¬ Minimal Reproduction
π₯ Exception or Error
core.js:5809 ERROR TypeError: Cannot assign to read only property 'tView' of object '[object Object]'
at getOrCreateTComponentView (core.js:11800)
at createRootComponentView (core.js:25350)
at ComponentFactory$1.create (core.js:32855)
at ViewContainerRef.createComponent (core.js:15150)
at RouterOutlet.activateWith (router.js:8939)
at RouterOutlet.ngOnInit (router.js:8846)
at callHook (core.js:3873)
at callHooks (core.js:3837)
at executeInitAndCheckHooks (core.js:3778)
at refreshView (core.js:11586)
π Your Environment
Angular Version:
Angular CLI: 9.0.0-rc.10
Node: 13.0.1
OS: linux x64
Angular: 9.0.0-rc.11
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
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 8.3.23
@angular-devkit/schematics 8.3.23
@angular/cdk 8.2.3
@angular/cli 9.0.0-rc.10
@angular/localize 9.0.0-rc.0
@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.6.5
webpack 4.41.2
Done in 0.42s.
Anything else relevant? It works if I disable Ivy
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:6 (2 by maintainers)
Top Results From Across the Web
typeError: Cannot assign to read only property 'tView' of object ...
This is a problem with NGRX Store and Ivy runtime which began in Angular 9. The problem is best explained here: ...
Read more >typeError: Cannot assign to read only property 'tView' of object ...
TypeError : Cannot assign to read only property 'tView' of object '[object ... This is a problem with NGRX Store and Ivy runtime...
Read more >ngrx/store - Gitter
im receiving an error: TypeError: Cannot assign to read only property 'macroTask' of object '#<Object>'. when im trying to do this this.store.dispatch(new ...
Read more >Angular Ngxs Typeerror: Cannot Freeze - ADocLib
TypeError : Cannot assign to read only property 'tView' of object '[object Object]' private Angular fields/API might be excluded from freeze operation. false ......
Read more >Template type checking - Angular
Just as TypeScript catches type errors in your code, Angular checks the expressions ... user is a property on the component class; user...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @tonivj5, thanks for additional information and a repro. I performed further investigation and it turned out that Ngrx freezes actions recursively, which also freezes Ivy defs generated by compilers. As a result, Ivy runtime fails to write to component def. I left more detailed reply in https://github.com/ngrx/platform/issues/2109#issuecomment-582689060.
There are no action items on framework side atm, so I will close this ticket and continue discussion in the mentioned thread in Ngrx repo.
Thank you.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.