Note: This article was published on 10/12/2024.
This is a seres of articles about Angular Installation, Upgrading.
Introduction
This article is to discuss some major errors incurred in this upgrading process.
The content of this article:
- Introduction
- Error 1: --- @use --- new way to @import
- Error 2: --- Cannot Resolve'ngx-observable-lifecycle'
- Error 3: --- enabled to enabledNonBlocking
- Error 4: --- error TS1005: '?' expected
- Error 5: --- @import => @use for ag-grid
- Error 6: --- error TS2345: Argument of type partial is not assignable to parameter of type
- Error 7: --- error TS5101: specify compilerOption '"ignoreDeprecations": "5.0"'
Error 1: --- @use --- new way to @import
Error:
![]()
Solution:
![]()
Code Changed:
![]()
Error 2: --- Cannot Resolve'ngx-observable-lifecycle'
Error:
![]()
Solution:
![]()
After installation:
![]()
Error 3: --- enabled to enabledNonBlocking
Error:
![]()
solution:
![]()
Error 4: --- error TS1005: '?' expected
Error:
![]()
Solution:
![]()
Fix:
![]()
Error 5: --- @import => @use for ag-grid
Error:
![]()
Solution:
Note: for this topic, there is no reference online, even I searched and read more than 20 articles. The solution is by tesing, hundred of testing. The hint was from Error 1 in this article.
![]()
Error 6: --- error TS2345: Argument of type partial is not assignable to parameter of type
Error:
![]()
Solution:
The info above from online are almost not useful. The final fix is like this --- get rid of the input parameter:
![]()
Second:
![]()
Third:
![]()
Error 7: --- error TS5101: specify compilerOption '"ignoreDeprecations": "5.0"'
Error:
![]()
Solutions:
![]()
AI Solution:
![]()
Fix:
![]()