HostResourceLoader中出现奇怪的错误:运行ng build,ng build --prod或ng serve

我正在创建一个角度为6的应用程序,但是当我尝试运行任何构建命令时遇到一个奇怪的错误: 1-ng构建 2- ng build --prod 3- ng构建服务

HostResourceLoader中的错误:ERROR:loader(F:/ Spark / Spark Apps Development / doPayroll前端/ doPayroll前端/src/app/getstarted/getstarted.component.html)返回了一个承诺

另外,错误显示在下图

HostResourceLoader中出现奇怪的错误:运行ng build,ng build --prod或ng serve

奇怪的是,当我按ctrl + s到任何ts文件时,错误已解决且应用程序运行,它继续编译并最终成功运行。

但是现在我需要部署我的应用程序,现在我在云中遇到了这个问题。

因此,请任何人能帮助您,这是我的应得之物。

更新

getstarted.component.html

<app-firstheader></app-firstheader>

<br>
<div class="main">
    <div class="welcome">
        <p [translate]="'getstarted.title'">
        </p>
    </div>
    <hr class="underline">
    <img width="300" src="assets/img/welcome.png">
    <p class="welcome2" [translate]="'getstarted.body'"></p>
    <button (click)="next()" class="button button4" [translate]="'getstarted.next'"></button>
</div>
<br>

<app-footer></app-footer>

getstarted.component.ts

import { Component,OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';

@Component({
  selector: 'getstarted',templateUrl: './getstarted.component.html',styleUrls: ['./getstarted.component.css']
})
export class GetstartedComponent implements OnInit {


  constructor(private router: Router) {}

  next(){
    this.router.navigate(['/presignup']);
  }

  ngOnInit() {
  }

}

谢谢。

magss 回答:HostResourceLoader中出现奇怪的错误:运行ng build,ng build --prod或ng serve

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3039794.html

大家都在问