The versions of @angular/compiler-cli and typescript are not being recognized. This issue is commonly caused by a faulty npm installation. Make sure that your package.json includes both @angular/compiler-cli and typescript in devDependencies. Then, delete node_modules and package-lock.json (if present) and run npm install again.
For further information, please refer to the attached file https://i.sstatic.net/GfoK3.png
I have included @angular/cli, @angular/compilet-cli, and typescripts as shown in the image.
I have updated the relevant versions and reinstalled all packages with npm i, then restarted VS Code. However, I am still encountering the same error.
I have attempted the solutions provided in this thread about @angular/compiler-cli and typescript versions, but without success.
Any assistance would be greatly appreciated.