I’m having problems in my angular angle , when I go from an npm start to that message

Asked

Viewed 301 times

0

This likely Means that the library (@angular/material/snack-bar) which declares Matsnackbar has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library’s Authors to see if the library is expected to be compatible with Ivy.

this so my Imports

app.modulets.

import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HeaderComponent } from './components/template/header/header.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { FooterComponent } from './components/template/footer/footer.component';
import { NavComponent } from './components/template/nav/nav.component'

import { MatToolbarModule } from '@angular/material/toolbar';
import { MatSidenavModule } from '@angular/material/sidenav'
import { MatCardModule } from '@angular/material/card'
import { MatListModule } from '@angular/material/list';
import { MatButtonModule } from '@angular/material/button';
import { MatSnackBar } from '@angular/material/snack-bar'
import { ProductCrudComponent } from './views/product-crud/product-crud.component';
import { ProductCreateComponent } from './components/products/product-create/product-create.component';
import { HomeComponent } from './views/home/home.component'

@NgModule({
  declarations: [
    AppComponent,
    HeaderComponent,
    FooterComponent,
    NavComponent,
    ProductCrudComponent,
    ProductCreateComponent,
    HomeComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    MatToolbarModule,
    MatSidenavModule,
    MatListModule,
    MatCardModule,
    MatButtonModule,
    MatSnackBar
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }```
  • i have done many things, already updated @angular/material, tried to update Ivy, angular and still copied src from my project and removed the folder in which I am doing angular and switched src from the new project in angular, I have tried to remove node_modules and reinstall and continue giving this proplema

  • Check in your package.json the version of your @angular/material if it is in accordance with the version of the angular installed in your project.

  • Hey, I saw the version and it was outdated, obr

1 answer

-2

Try adding in package.json "scripts": { "postinstall": "ngcc" }

Browser other questions tagged

You are not signed in. Login or sign up in order to post.