简体   繁体   中英

ionic 4 getting an error in app.module.ts page, import { NgModule } from '@angular/core';

在此处输入图像描述 when i hoover on error am getting Parsing error: Cannot read file < 'e:\simmongrim\spotify\tsconfig.json'.eslint. > colud anyone please help me. have been struck with this error for more than a week did not get any solution. please please anyone help me. thanks in advance..

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
  providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
  bootstrap: [AppComponent],
})
export class AppModule {}

If you are trying to use reactive forms, then it might be that you are missing ReactFormsModule in your imports.

Does the tsconfig.json file exist at the root of your app ( e:\simmongrim\spotify\tsconfig.json )? If not, you will want to add that file. Angular has a TypeScript configuration page that may also help you with properties to add to that file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM