AOT错误:ng build --prod在Angular 7中给出错误

时间:2019-04-10 14:38:25

标签: angular typescript compiler-errors angular2-aot

错误消息:

Lambda not supported.
 {"__symbolic":"error","message":"Lambda not supported","line":45,"character":23}

我已将我的Angular 6应用程序升级到Angular 7。我在ng build --prod上运行aot: true,并遇到错误。升级到Angular 7

之前一切正常

代码:这是出错的地方

public static request(requestUrl: string, options?: RequestInit): Promise<FetchResponse> {
    return new Promise((resolve, reject) => {
      fetch(requestUrl, options)
        // .then(HelperFetch.parseJSON)
        .then((response: any) => {
          const resolver = new Resolver();
          // other code
          return <any> resolver.promise;
        })        
        .catch((error) => reject(new FetchResponse({

        })));
    });
  }

有人知道这可能是什么问题吗?以及如何解决这个问题?

0 个答案:

没有答案