Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

225
Visualizações
Uncaught TypeError: Cannot read properties of undefined (reading 'LabelModule')

The error happens when I import my LabelModule into the FormFieldModule. Then I use the Label Component in the FormField Component.

I do not import/use those modules/components anywhere else.

This is my FormFieldModule:

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

import { FormFieldComponent } from './form-field.component';
import { LabelModule } from '@app/shared';

@NgModule({
    declarations: [FormFieldComponent],
    imports: [CommonModule, LabelModule],
    exports: [FormFieldComponent],
})
export class FormFieldModule {}

This is my LabelModule:

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

import { LabelComponent } from './label.component';

@NgModule({
    declarations: [LabelComponent],
    exports: [LabelComponent],
    imports: [CommonModule],
})
export class LabelModule {}

The thing is when I import the modules like this, it works.

import { LabelModule } from '@app/shared/components/form-elements/label';
import { ValidationErrorModule } from '@app/shared/components/form-elements/validation-error';

The import shortening works everywhere else. But not here. Another thing I noticed - it works flawlessly when I build the project for production and serve it, no errors, no warnings, it just works. Seems to only be the development issue.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda