After encountering a compiler issue, I had to upgrade to TypeScript 3+ in order to resolve it. However, I am now facing difficulties getting the Angular compiler to process the upgraded version.
ERROR in The Angular Compiler requires TypeScript >=2.7.2 and <2.10.0 but 3.1.6 was found instead.
To address this problem, I went ahead and deleted the node_modules
directory, removed the package-lock.json
file, updated the package.json
configuration, and executed npm install
. I utilized the version from a project generated using ng new
.
From what I have researched, TypeScript 3+ should be compatible with Angular 7. Therefore, I attempted this approach. Presently, my package.json appears as follows:
While downgrading TypeScript could potentially fix the issue, it would reintroduce an old problem, making it an unfavorable choice for me.
{
"name": "workouttracker",
"version": "0.1.0",
// other dependencies listed here...
}
Angular CLI has been successfully installed on my system.
Angular CLI: 7.3.9
Node: 8.12.0
OS: win32 x64
Angular: 7.0.4
... common, compiler, core, forms, http, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.8.9
// more packages listed here...
webpack 4.16.4
My goal is to run ng build without encountering any errors.