我想在另一台CentOS 7机器上自动构建我的角度项目。
使用以下版本:
Angular CLI: 8.3.23
Node: 13.14.0
OS: linux x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
@angular-devkit/architect 0.803.23
@angular-devkit/build-angular 0.803.25
@angular-devkit/build-ng-packagr 0.803.23
@angular-devkit/build-optimizer 0.803.25
@angular-devkit/build-webpack 0.803.25
@angular-devkit/core 8.3.23
@angular-devkit/schematics 8.3.23
@angular/cdk 8.2.3
@angular/cli 8.3.23
@angular/http 7.2.16
@angular/material 8.2.3
@ngtools/webpack 8.3.25
@schematics/angular 8.3.23
@schematics/update 0.803.23
rxjs 6.5.5
typescript 3.4.5
webpack 4.39.2
节点版本12也没有任何改变。
构建错误:
chunk {main} main.js, main.js.map (main) 655 bytes [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 127 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 463 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 43.9 kB [initial] [rendered]
Date: 2020-06-25T10:35:22.517Z - Hash: 82d7bfce3451c02dfe5f - Time: 11782ms
ERROR in app/interfaces/ISharepoint.ts:5:22 - error TS2307: Cannot find module './IQuota'.
5 import {IQuota} from './IQuota';
app/interfaces/ISharepointUser.ts:4:22 - error TS2307: Cannot find module './IQuota'.
4 import {IQuota} from "./IQuota";
app/interfaces/isharepointnetwork.ts:3:22 - error TS2307: Cannot find module '../interfaces/IQuota'.
3 import {IQuota} from "../interfaces/IQuota";
app/sharepoints/InitializeSharepointProperties.ts:7:34 - error TS2307: Cannot find module '../interfaces/ISharepointNetwork'.
7 import {ISharepointNetwork} from '../interfaces/ISharepointNetwork';
app/sharepoints/sharepoints.component.ts:32:22 - error TS2307: Cannot find module '../interfaces/IQuota'.
32 import {IQuota} from '../interfaces/IQuota';
如何解决此问题?
我的app.modoule.ts
export const appRouterProviders = [
provideRoutes(appRoutes)
];
@NgModule({
declarations: [
AppComponent,
DashboardComponent,
ProfilesComponent,
NetworksComponent,
ServicesComponent,
SystemComponent,
SharepointsComponent,
LoginComponent,
AuthenticationComponent,
ErrorComponent,
LogsComponent,
FilterTimezone,
FileSizePipe,
MatchHeightDirective,
NtpComponent,
P5Component,
DndDirective,
ProgressComponent
],
imports: [
BrowserModule,
MultiSelectModule,
ChipsModule,
MaterializeModule,
ChartModule,
CheckboxModule,
DragDropModule,
ListboxModule,
PickListModule,
FormsModule,
TooltipModule,
TreeModule,
InputMaskModule,
TableModule,
BrowserAnimationsModule,
HttpClientModule,
MaterializeModule,
DialogModule,
RouterModule.forRoot(appRoutes),
MalihuScrollbarModule.forRoot(),
RouterModule,
ProgressBarModule,
MessagesModule,
TooltipModule,
PickListModule,
EditorModule,
NgMultiSelectDropDownModule.forRoot(),
LocalStorageModule.forRoot({
prefix: 'juststore',
storageType: 'localStorage'
}),
UiSwitchModule,
AngularEditorModule
],
providers: [
provideRoutes(appRoutes),
HttpClient,
ToaauthenticationService,
LocalStorageService,
{
provide: HTTP_INTERCEPTORS,
useClass: HTTPAuthHeader,
multi: true
}
],
bootstrap: [AppComponent]
})
export class AppModule {
}
答案 0 :(得分:0)
我重命名了所有接口,并从名称中删除了开头的I,现在构建过程正在按预期进行。