【问题标题】:After upgrading to angular 8升级到 Angular 8 后
【发布时间】:2019-11-07 18:12:58
【问题描述】:

升级到 Angular 8 后,开始出现这些错误。还没有在网上找到任何谈论这个问题的东西。是不是因为一个文件不能有超过 1 个导出。上传了一个包含所有导出的模型文件样本。

 "export 'IOverlays' was not found in 
  '../../../../../shared/brief-data/brief-data.models'
  ERROR in 



./client/app/viz/globe/state/submodules/display/display.actions.ts 
 41:12-34
 "export 'IPerformSettingB
ERROR in 
./client/app/viz/globe/state/submodules/display/display.actions.ts 
77:12-34
"export 'IPerformSettingBoolean' was not found in 
  '../../../models/globe'
ERROR in 
./client/app/viz/globe/state/submodules/display/display.actions.ts 
 113:12-34



export interface IGlobeTimelinePoint {
  date: Date;
}
export interface IGlobeTimelineData {
 data: IGlobeTimelinePoint[];
 presentSources: string[];
}
export interface ILiveFeedStatus {
  acm: IAcm;
  isLoading: boolean;
  hasErrors: boolean;
  error?: string;
}

export interface ILiveFeedStatuses {
   [key: string]: ILiveFeedStatus;
}

export interface ILiveFeedIcons {
  [key: string]: ILiveFeedIconConfig;
}
export interface IOntologyConfig {
    [name: string]: {
    values: string[];
};
}

【问题讨论】:

  • 好吧,也许检查一下brief-data.models.ts 是否有一个命名导出IOverlays
  • 确实如此,在升级到 Angular 8 @scipper 之前没有错误
  • 能否请您上传brief-data.models.ts的完整源代码以及如何将其导入另一个文件
  • @TonyNgo 添加了我的代码示例
  • 这些问题在 Angular 7 中从未发生过

标签: angular typescript angular8


【解决方案1】:

我遇到了同样的问题。从文件名中删除 .d 为我修复了它(例如 my-declarations.d.ts -> my-declarations.ts

我不知道为什么。

【讨论】:

    猜你喜欢
    • 2019-11-30
    • 1970-01-01
    • 2020-03-21
    • 1970-01-01
    • 1970-01-01
    • 2019-12-02
    • 1970-01-01
    • 2020-04-09
    • 2020-05-25
    相关资源
    最近更新 更多