Angular ng-version not updating? #314

Closed
opened 2025-08-09 17:15:49 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @ryanbuening on 11/17/2017

I create a new Angular app using dotnet new angular which currently specifies Angular 4.2.5 in the package.json. I run the app and view source and ng-version is 4.2.5 which is correct.

I then specify Angular to use 4.4.6 in the package.json:

"devDependencies": {
    "@angular/animations": "^4.4.6",
    "@angular/common": "^4.4.6",
    "@angular/compiler": "^4.4.6",
    "@angular/compiler-cli": "^4.4.6",
    "@angular/core": "^4.4.6",
    "@angular/forms": "^4.4.6",
    "@angular/http": "^4.4.6",
    "@angular/platform-browser": "^4.4.6",
    "@angular/platform-browser-dynamic": "^4.4.6",
    "@angular/platform-server": "^4.4.6",
    "@angular/router": "^4.4.6"

I completely remove the node_modules folder and run npm install. After install, I check .\node_modules\@angular\common\package.json and it shows a 4.4.6 version. However, when I run the app, ng-version still shows 4.2.5. Why does it still show 4.2.5? How do I fix this?

*Originally created by @ryanbuening on 11/17/2017* I create a new Angular app using `dotnet new angular` which currently specifies Angular `4.2.5` in the package.json. I run the app and view source and `ng-version` is `4.2.5` which is correct. I then specify Angular to use `4.4.6` in the package.json: "devDependencies": { "@angular/animations": "^4.4.6", "@angular/common": "^4.4.6", "@angular/compiler": "^4.4.6", "@angular/compiler-cli": "^4.4.6", "@angular/core": "^4.4.6", "@angular/forms": "^4.4.6", "@angular/http": "^4.4.6", "@angular/platform-browser": "^4.4.6", "@angular/platform-browser-dynamic": "^4.4.6", "@angular/platform-server": "^4.4.6", "@angular/router": "^4.4.6" I completely remove the `node_modules` folder and run `npm install`. After install, I check `.\node_modules\@angular\common\package.json` and it shows a `4.4.6` version. However, when I run the app, `ng-version` still shows `4.2.5`. Why does it still show `4.2.5`? How do I fix this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#314
No description provided.