This is a seres of articles about Angular Installation, Upgrading.
- Angular Installation and Environment Setup
- Update Angular For Environment And Project
- Update nx-angular:
- Update nx-Angular from 12 to 17 (1) --- Initial Point
- Update nx-Angular from 12 to 17 (2) --- in a nx environment
- Update nx-Angular from 12 to 17 (3) --- to Latest or Version by Version?
- Update nx-Angular from 12 to 17 (4) --- Debugging (1)
- Update nx-Angular from 12 to 17 (5) --- Debugging (2) --- this article
- Update nx-Angular from 12 to 17 (6) --- .Net updating vs. Angular updating
Introduction
This article is to discuss some major errors incurred in this upgrading process.
The content of this article:
- Introduction
- Error 1: --- export 'ɵmarkDirty' (imported as 'ɵmarkDirty') was not found in '@angular/core'
- Error 2: --- Error NG6002: 'XXX' does not appear to be an NgModule class
- Error 3: --- Error NG8001/8002: Can't bind to 'modules' since it isn't a known property of 'xxx-angular' --- stricttempletes false
- Error 4: --- Error: Can't resolve 'dragula'
- Error 5: --- Error: Module Build Failed
- Error 6: --- Deprecation of
AgGridModule.withComponents()
Error 1: --- export 'ɵmarkDirty' was not found in '@angular/core'
-
Upgrade to [email protected]
Error:

Solution: --- no related solution online
- Error: export 'ɵmarkDirty' (imported as 'ɵmarkDirty') was not found in '@angular/core' - Stack Overflow --- opened by myself, no answer yet
- npm - Angular compilation warning: "export 'ɵɵdefineInjectable' was not found in '@angular/core' - Stack Overflow --- borrowed

We do the similar for ngx-sub-form to solve the issue:

Error 2: --- Error NG6002: 'XXX' does not appear to be an NgModule class
-
Upgrade to [email protected]
Error:

Solution:
As indicated in the error page:
- This likely means that the library (@fortawesome/angular-fontawecome) which declares FontAwesomeModule is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so.
Update
- @fortawesome/angular-fontawesome - npm (npmjs.com)
- @fortawesome/angular-fontawesome - npm package | Snyk
Fix:
npm install @fortawesome/[email protected] --legacy-peer-deps

Similar ones, such as
npm install @azure/[email protected] --legacy-peer-deps
npm install [email protected] --legacy-peer-deps
npm install ngx-extended-pdf-viewer @15.1.0 --legacy-peer-deps
npm install [email protected] --legacy-peer-deps
npm install [email protected] --legacy-peer-deps
npm install [email protected] --legacy-peer-deps
npm install [email protected] --legacy-peer-deps
Error 3: --- Error NG8001/8002: Can't bind to 'modules' since it isn't a known property of 'xxx-angular' --- stricttempletes false
-
Upgrade to [email protected]
Error:

Solution:

Fix:

For all:

Results: --- reduced NG8001 from 25 to 6; NG8002 from 41 to 20

Note: Disabling strickTempletes coudl be lead to some run time errors;

or

Futhermore:

Error 4: --- Error: Can't resolve 'dragula'
-
Upgrade to [email protected]
Error:

Solution:

Fix:

Error 5: --- Error: Module Build Failed
-
Upgrade to [email protected]
Error:

Solutions:



Fix:

Error 6: --- Deprecation of AgGridModule.withComponents()
-
Upgrade to [email protected]
Error: a lot
Solution:
- Upcoming changes to AG Grid Angular in v28 --- Deprecation of
AgGridModule.withComponents() - ag-grid updating

Fix:

References:
- NG6002
- NG6002 - Google Search
- Write Like a Pro | Write Your Best Work With Grammarly (youtube.com)
- Move from import to declare --- not work
- javascript - error NG6002: Appears in the NgModule.imports of AppModule, but itself has errors - Stack Overflow
- General suggestions
- error NG6002 shows a problem in an import, but there is no other error detailing what is wrong with the module · Issue #50792 · angular/angular (github.com)
- This import contains errors, which may affect components that depend on this ngmodule. - Brainly.in
- Answer: error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class - DEV Community
- error NG6002 - Tape --- "enableIvy": false --- not work
- NG6002 - Google Search


Join the conversation! Your thoughts help the community grow.