My angular 7 project was working perfectly until this afternoon. When I did 'ng serve' I got these errors: node_modules/@angular/common/http/src/client.d.ts(2514,30): error TS2304: Cannot find name 'ArrayBuffer'.
node_modules/@angular/common/http/src/client.d.ts(2580,30): error TS2304: Cannot find name 'Object'.
node_modules/@angular/common/http/src/client.d.ts(2621,33): error TS2304: Cannot find name 'ArrayBuffer'.
and so it goes on till the end of all node_modules. I tried deleting the node_module folder and then 'npm install". Still it didn't work.
This is my package.json file
{
"name": "cotrajectplanner2",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"angular-chart.js": "^1.1.1",
"bootstrap": "^4.4.1",
"chart.js": "^2.9.3",
"core-js": "^2.5.4",
"jquery": "^3.4.1",
"jqwidgets-ng": "^8.3.2",
"popper.js": "^1.16.0",
"router": "^1.3.3",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.0",
"@angular/cli": "~7.3.3",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "3.1.1"
}
}
Thanks in advance
Sincerely Sarah
Edit: added app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { LoginComponent } from './general/login/login.component';
import { RouterModule } from '@angular/router';
import { AppRoutingModule } from './app-routing.module';
import { HomeStudentComponent } from './student/home-student/home-student.component';
import { HomeTeacherComponent } from './teacher/home-teacher/home-
teacher.component';
import { StudentInfoComponent } from './student/student-info/student-info.component';
import { StudentStudyProgressComponent } from './student/student-study-progress/student-study-progress.component';
import { StudentOnMyWayToComponent } from './student/student-on-my-way-to/student-on-my-way-to.component';
import { OverviewTrajectoriesComponent } from './teacher/overview-trajectories/overview-trajectories.component';
import { OverviewCoursesComponent } from './teacher/overview-courses/overview-courses.component';
import { OverviewStudentsComponent } from './teacher/overview-students/overview-students.component';
import {HttpClientModule} from '@angular/common/http';
import { FooterComponent } from './general/footer/footer.component';
import { HeaderComponent } from './general/header/header.component';
@NgModule({
declarations: [
AppComponent,
LoginComponent,
HomeStudentComponent,
HomeTeacherComponent,
StudentInfoComponent,
StudentStudyProgressComponent,
StudentOnMyWayToComponent,
OverviewTrajectoriesComponent,
OverviewCoursesComponent,
OverviewStudentsComponent,
FooterComponent,
HeaderComponent
],
imports: [
BrowserModule,
RouterModule,
AppRoutingModule,
HttpClientModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }