У меня есть Angular 9,0 В и NodeJS 12,16 В, система js 0,21,5 В, ядро - js 2,6,9 В в моем пакете. json файл. Я получаю эту ошибку -
(index):153 SyntaxError: Unexpected token '<'
at eval (<anonymous>)
at evaluate (http://localhost:8080/node_modules/systemjs/dist/system.src.js?1582797940325:2860:18)
at http://localhost:8080/node_modules/systemjs/dist/system.src.js?1582797940325:3665:23
at doEvaluateDynamic (http://localhost:8080/node_modules/systemjs/dist/system.src.js?1582797940325:1166:33)
at http://localhost:8080/node_modules/systemjs/dist/system.src.js?1582797940325:1026:17
at doEvaluateDynamic (http://localhost:8080/node_modules/systemjs/dist/system.src.js?1582797940325:1163:9)
at http://localhost:8080/node_modules/systemjs/dist/system.src.js?1582797940325:1026:17
at Object.eval (http://localhost:8080/app/main.js:3:14)
at eval (http://localhost:8080/app/main.js:13:4)
at eval (http://localhost:8080/app/main.js:14:3) Not expecting this error? Report it at https://github.com/mgechev/angular2- seed/issues
У меня есть сервер и клиент. Это файл src / client, который имеет основную проблему. Сервер работает. App.module.ts
import { ErrorHandler, NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { BrowserModule, Title } from '@angular/platform-browser';
import { APP_BASE_HREF } from '@angular/common';
import { RouterModule } from '@angular/router';
import { routes } from './app.routes';
import { Http, HttpModule, RequestOptions, XHRBackend } from '@angular/http';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import { AppRequestOptions, LoaderService, MessageService, SessionStorageService, ThemeChangeService,
BaseService, CommonService } from './shared/index';
import { ContactService } from './framework/dashboard/contact/contact.service';
import { ContactService1 } from './framework/home-page/home-page.service';
import { ActivateUserComponent } from './framework/registration/activate-user/activate-user.component';
import { ActiveUserService } from './framework/registration/activate-user/activate-user.service';
import { RedirectRecruiterDashboardService } from './user/services/redirect-dashboard.service';
import { LoggerService, MyErrorHandler } from './build-info/framework/my-error-handler.service';
import { UserModule } from './user/user.module';
import { SharedModule } from './shared/shared.module';
import { CustomHttp } from './shared/services/http/custom.http';
import { SharedService } from './shared/services/shared-service';
import { PageNotFoundComponent } from './shared/page-not-found/page-not-found.component';
import { AuthGuardService } from './shared/services/auth-guard.service';
import { HttpDelegateService } from './shared/services/http-delegate.service';
//Application IMPORTS
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {ValidationService} from './shared/customvalidations/validation.service';
import {ErrorService} from './shared/services/error.service';
import {UsageTrackingService} from './build-info/framework/usage-tracking.service';
import {CreateProjectModule} from './build-info/framework/create-project/create-project.module';
import {DashboardModule} from './framework/dashboard/dashboard.module';
import {BuildingModule} from './build-info/framework/project/building/building.module';
import {ResetPasswordModule} from './framework/login/forgot-password/reset-password/reset-password.module';
import {CreateBuildingModule} from './build-info/framework/project/building/create-building/create-building.module';
import {LoginModule} from './framework/login/login.module';
import {CandidateSignUpModule} from './framework/registration/candidate-sign-up/candidate-sign-up.module';
import {ForgotPasswordModule} from "./framework/login/forgot-password/forgot-password.module";
import { AdminComponent } from './build-info/framework/admin/admin.component';
import { AdminService } from './build-info/framework/admin/admin.service';
import {ProjectHeaderVisibilityService} from "./shared/services/project-header-visibility.service";
@NgModule({
imports: [
BrowserModule,
FormsModule,
RouterModule.forRoot(routes),
HttpModule,
ReactiveFormsModule,
SharedModule,
UserModule,
CreateProjectModule,
CreateBuildingModule,
BuildingModule,
DashboardModule,
ResetPasswordModule,
ForgotPasswordModule,
LoginModule,
CandidateSignUpModule,
BrowserAnimationsModule
],
declarations: [
AppComponent,
ActivateUserComponent,
PageNotFoundComponent,
AdminComponent
],
providers: [
{
provide: Http,
useFactory: httpFactory,
deps: [XHRBackend, RequestOptions, MessageService, LoaderService]
},
{provide: RequestOptions, useClass: AppRequestOptions},
LoggerService, {provide: ErrorHandler, useClass: MyErrorHandler},
{
provide: APP_BASE_HREF,
useValue: '<%= APP_BASE %>'
},
ContactService,
ContactService1,
ActiveUserService,
RedirectRecruiterDashboardService,
SharedService,
Title,
AuthGuardService,
HttpDelegateService,
LoaderService,
UsageTrackingService,
ValidationService,
SessionStorageService,
MessageService,
SharedService,
ThemeChangeService, CommonService, BaseService, CustomHttp, ErrorService, SessionStorageService,
AdminService,
ProjectHeaderVisibilityService
],
bootstrap: [AppComponent]
})
export class AppModule {
}
export function httpFactory(backend: XHRBackend, defaultOptions: RequestOptions, messageService: MessageService,
loaderService: LoaderService) {
return new CustomHttp(backend, defaultOptions, messageService, loaderService);
}
Здесь код выше app.module.ts