Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!