I get error ".form-floating>~label" in ng build

Discussão em 'Angular' iniciado por DaroGawlik, Fevereiro 22, 2025.

  1. DaroGawlik

    DaroGawlik Guest

    I try to run command "ng build" in my Angular app next i get:

    ✔ Browser application bundle generation complete.
    ✔ Copying assets complete.
    ⠋ Generating index html...4 rules skipped due to selector errors:
    .form-floating>~label -> Did not expect successive traversals.
    .form-floating>~label -> Did not expect successive traversals.
    .form-floating>~label -> Did not expect successive traversals.
    .form-floating>~label -> Did not expect successive traversals.
    ✔ Index html generation complete.


    I use bootstrap@5.3.1. I saw what is it in documentation but I didn't use these bootstrap class in my app. I have some inputs, labels etc like this:

    <form #authForm="ngForm" (ngSubmit)="onSubmit(authForm)" *ngIf="!isLoading">
    <div class="form-group">
    <label for="email" class="col-12 mb-3">E-Mail:</label>
    <input type="email" class="col-12 mb-3" id="email" ngModel name="email" required email />
    </div>
    <div class="form-group">
    <label for="password" class="col-12 mb-3">Password:</label>
    <input type="password" class="col-12 mb-3" id="password" ngModel name="password" required
    minlength="6" />
    </div>
    <div *ngIf="error" class="text-center">
    <p [ngStyle]=" { 'color' : 'red' }">{{ error }}</p>
    </div>
    <button class="btn-login" type="submit" [disabled]="!authForm.valid"> {{ isLoginMode ? 'Login' : 'Sign Up'
    }}</button>
    <button class="btn-login" type="button" [disabled]="!authForm.valid" (click)="onSwitchMode()">Switch to {{
    isLoginMode ? 'Sign Up' :
    'Login' }}</button>
    </form>


    I don't know what can I do with this to resolve the problem.

    Continue reading...

Compartilhe esta Página