Reputation: 1820
Just joined a project where they're using Angular and I can see in the package.json file these dependencies:
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "^8.0.3",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
But if I type in ng -v then I get a command not found error. I'm guessing it's because I don't have the Angular CLI installed. Do I need it? Seems like I don't. What will I be unable to do without having the Angular CLI package installed?
PS - I'm using NVM.
Thanks for any helpful info.
Upvotes: 1
Views: 1044
Reputation: 3276
No, you don't need it, but it is good to create component and modules fast with ng g
option and building or serving the project.
To fix your error of running ng -v
you need to install angular-cli globally, like that:
npm install -g angular-cli
If you want to use your local angular-cli, you can run this:
npm run-script ng -v
and you will see the local angular-cli version instead of the global
Upvotes: 3