Reputation: 328
I run npm install -g typescript
to update my TypeScript
version globally, but when I run ng v
in my Angular
project, I still see an old version. Why is that? How can I consistently upgrade this?
Upvotes: 14
Views: 29248
Reputation: 978
To upgrade the typescript version of your Angular project to the latest stable version, use :
npm i typescript@latest --save-dev
You can verify the upgrade in your package.json
file :
"devDependencies": {
// ...
"typescript": "^5.2.2" // typescript current installed version
}
Upvotes: 18
Reputation: 152
You can run the below code to upgrade the version of your current project
npm i typescript@next -D
Upvotes: 11