I encountered an issue while compiling my project:
PS C:\Users\hasna\Downloads\A La Marocaine git - Copie\ALaMarocaineFinal\frontend\src\app> ng serve
Compiling @angular/forms : es2015 as esm2015
An unhandled exception occurred: Failed to compile entry-point @angular/forms (`es2015` as esm2015) due to compilation errors:
../../node_modules/@angular/forms/fesm2015/forms.js:6219:1 - error NG1006: Two incompatible decorators on class
6219 class MaxValidator extends AbstractValidatorDirective {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6220 constructor() {
~~~~~~~~~~~~~~~~~~~
...
6237 }
~~~~~
6238 }
~
...
Below is the content of my package.json file:
{
"name": "book-store",
...
}
Here is the version information for Angular CLI and Node.js:
C:\Users\hasna>ng --version
Angular CLI: 13.3.0
Node: 16.14.2
Package Manager: npm 6.14.17
OS: win32 x64
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1303.0 (cli-only)
@angular-devkit/core 13.3.0 (cli-only)
@schematics/angular 13.3.0 (cli-only)
I have tried various solutions suggested online but none seem to work. Could someone please assist me with resolving this error?
Your help in solving this error would be greatly appreciated!
EDIT 1: Attached below is the log from C:\Users\hasna\AppData\Local\Temp\ng-I9dgUP\angular-errors.log file
[error] Error: Failed to compile entry-point @angular/forms (`es2015` as esm2015) due to compilation errors:
...
EDIT 2: Here is the app.module.ts file containing the Angular module details.
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
...
@NgModule({
declarations: [
AppComponent,
ToolbarComponent,
PlatsearchpipePipe,
CartComponent,
...
],
imports: [
MatBadgeModule,
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
...
],
providers: [HttpClient],
bootstrap: [AppComponent]
})
export class AppModule { }