While following a tutorial from Angular University, I encountered an issue where running ng serve/npm start would fail. However, simply re-saving any file by adding or removing a blank space would result in successful compilation. You can view the screenshot here.
My Package.json:
{
"name": "reactive-patterns-course",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "./node_modules/.bin/ng serve --proxy-config proxy.conf.json",
"rest-api": "./node_modules/.bin/ts-node ./src/server/server.ts",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
// List of dependencies
},
"devDependencies": {
// List of dev dependencies
}
}
Could someone assist with this issue? I tried running NPM update without success. My environment details are:
Angular CLI: 1.7.4
Node: 8.10.0
I am not using any generic types here. Even if someone were to use them, it should consistently fail. Below is the app-data file content:
import * as _ from 'lodash';
import {Observable} from 'rxjs/Observable';
import {Lesson} from '../shared/model/lesson';
// Definition of interfaces and classes
export let lessonList$: Observable = {
subscribe: obs => lessonsListSubject.subscribe(obs),
unsubscribe: obs => lessonsListSubject.unsubscribe(obs)
};
let lessons: Lesson[] = [];
export function initializeLessonsList(newList: Lesson[]) {
// Function implementation
}