Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ng --version shows <error> for Angular version number and some packages

Tags:

angular

when trying to retrieve the information about my Angular package, i got the below <error> both for Angular version, one package and typescript :

$ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 12.1.3
Node: 14.17.3
Package Manager: npm 6.14.13
OS: win32 x64

Angular: <error>
... common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1201.3 (cli-only)
@angular-devkit/build-angular   <error>
@angular-devkit/core            12.1.3 (cli-only)
@angular-devkit/schematics      12.1.3 (cli-only)
@angular/cli                    12.1.3 (cli-only)
@schematics/angular             12.1.3 (cli-only)
rxjs                            6.6.7 (cli-only)
typescript                      <error>

I've tried uninstall / install again both node.js, npm, angular/cli. Nothing works ! still the error keeps coming back. Any idea on your side ?

like image 872
lauWM Avatar asked Nov 30 '25 22:11

lauWM


1 Answers

Delete your node_modiles and your package-lock.json:

rm -rf node_modules
rm package-lock.json

Then install all packages again:

npm install

And if that doesn't help try to reinstall the angular devkit:

npm install @angular-devkit/build-angular
like image 136
Udi Mazor Avatar answered Dec 02 '25 13:12

Udi Mazor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!