7

I tried to check the angular version of the project I'm working on by doing ng version but the value I'm getting are the ff:

Angular CLI: 8.2.1 Node: 10.16.0 OS: win32 x64 Angular: undefined 

how do I know what version of my angular?

5
  • 2
    The CLI is for Angular but you seem to be using AngularJS. Commented Aug 14, 2019 at 9:17
  • @str yeah it seems to be the case, is there any issues with that in the project? or is there other ways for me to know the Angular version when the CLI is angular? Commented Aug 14, 2019 at 9:45
  • I highly doubt that you can use the CLI with AngularJS at all. Commented Aug 14, 2019 at 9:50
  • Possible duplicate of How can I check which version of Angular I'm using? Commented Aug 14, 2019 at 9:50
  • 5
    this isn't duplicate since I checked that link before I created this question. and the answers there are just way of getting the version not the answer to "why" is it undefined. but thanks Commented Aug 15, 2019 at 1:11

2 Answers 2

6

It sounds like you are running this command outside the Angular project folder where there is no package.json or angular.json

https://github.com/angular/angular-cli/issues/17683

Sign up to request clarification or add additional context in comments.

Comments

5

This is because as of Angular 7, the version of Angular core and Angular CLI need to be aligned, so their versions are likely to be the same. As your version is above 7, there is no explicit need to mention Angular Version seeing that Angular CLI version is already mentioned. Source: https://angular.io/guide/releases

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.