Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

704
Vistas
No se puede declarar el módulo en un NgModule ya que no es parte de la compilación actual Angular

No estoy seguro de lo que está sucediendo aquí, pero recibo este error 'No se puede declarar 'FormsModule' en un NgModule ya que no es parte de la compilación actual' al importar 'formsModule' y 'reactiveformsmodule' en mi componente app.module.

Estoy ejecutando angular 9 y he intentado borrar el caché, reinstalando npm. ¿Podrían ser estos un problema angular 9? ¿Bajando a 8 solucionaría el problema?

Estoy confundido en cuanto a lo que está pasando aquí, ya que importó bien el día anterior.

aplicación.módulo.ts

 import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { HttpClientModule } from '@angular/common/http'; import { ExpertAdviceLandingPageComponent } from './expert-advice-landing-page/expert-advice-landing-page.component'; import { InstagramComponent } from './instagram/instagram.component'; import { MDBBootstrapModule } from 'angular-bootstrap-md'; import { SharedModule } from './shared/shared.module'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BuyingGuideComponent } from './buying-guide/buying-guide.component'; import { IdeasAndInspirationComponent } from './ideas-and-inspiration/ideas-and-inspiration.component'; import { AdviceAndGuidanceComponent } from './advice-and-guidance/advice-and-guidance.component'; import { GuidesComponent } from './guides/guides.component'; import { CommonModule } from '@angular/common'; import { CarouselComponent } from './carousel/carousel.component'; import { CarouselModule } from 'angular-bootstrap-md'; import { AppRoutingModule } from './app-routing.module'; import { SharedService } from './shared/sharedService'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; @NgModule({ declarations: [ AppComponent, BuyingGuideComponent, IdeasAndInspirationComponent, AdviceAndGuidanceComponent, GuidesComponent, ExpertAdviceLandingPageComponent, InstagramComponent, CarouselComponent, FormsModule, ReactiveFormsModule ], imports: [ BrowserModule, SharedModule, HttpClientModule, CommonModule, CarouselModule, MDBBootstrapModule.forRoot(), BrowserAnimationsModule, AppRoutingModule, NgbModule, FormsModule, ReactiveFormsModule ], providers: [SharedService], bootstrap: [AppComponent] }) export class AppModule { }
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Al importar módulos en Angular, debe colocarse debajo de la matriz de imports , no en las declarations .

 declarations: [ AppComponent, // ReactiveFormsModule---remove from declarations and add in import because its is imported // FormsModule`enter code here`---remove from declarations and add in import ], imports: [ ReactiveFormsModule, FormsModule ]
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda