angular在windows上构建并在ubuntu上抛出错误(找不到模块或其相应的类型声明)

angular在windows上构建并在ubuntu上抛出错误(找不到模块或其相应的类型声明),angular,typescript,ubuntu,build,github-actions,Angular,Typescript,Ubuntu,Build,Github Actions,我在我的windows计算机上有一个angular项目,现在我想使用GitHub操作来构建我的应用程序。该构建在我的windows计算机上运行良好,在我重新整理存储库时也是如此。在使用GitHub操作的构建中,angular编译器抛出一个错误。我测试了在我自己的ubuntu虚拟机中构建代码,也抛出了错误 错误: src/app/components/overview.component.ts:4:23 - error TS2307: Cannot find module 'src/app/tra

我在我的windows计算机上有一个angular项目,现在我想使用GitHub操作来构建我的应用程序。该构建在我的windows计算机上运行良好,在我重新整理存储库时也是如此。在使用GitHub操作的构建中,angular编译器抛出一个错误。我测试了在我自己的ubuntu虚拟机中构建代码,也抛出了错误

错误:

src/app/components/overview.component.ts:4:23 - error TS2307: Cannot find module 'src/app/translated' or its corresponding type declarations.

4 import { Translated } from 'src/app/translated';
                        ~~~~~~~~~~
几乎我所有的组件都使用翻译服务和它的更改侦听器。因此,我为我的组件创建了一个名为“Translated”的抽象基类:

从'rxjs'导入{Subscription};
从“./services/translation.service”导入{TranslationService};
从“/i18n/utils”导入{Translation};
出口类翻译{
订阅:订阅[]=[];
翻译:翻译;
构造函数(受保护的translationService:translationService){
this.translation=this.translationService.translation;
此项。订阅=[
this.translationService.change.subscribe(translation=>this.translation=translation)
];
}
值(多语言字段:任意){
const value=multi-languageField.translations[this.translationService.getCurrentLanguageCode().toUpperCase()];
返回值?值:multilanguageField.defaultValue;
}
}
这似乎在我的概览组件中抛出了错误,我想在其中扩展类:

从'@angular/core'导入{Component};
从'src/app/Translated'导入{Translated};
从'src/app/services/translation.service'导入{TranslationService};
@组成部分({
选择器:“应用程序概述”,
templateUrl:'./overview.component.html',
样式URL:['./overview.component.scss']
})
导出类OverviewComponent扩展{
构造函数(translationService:translationService){
超级(翻译服务);
}
获取标题():字符串{
返回此.translation.overview;
}
}