npm doesn't update tsc version

Viewed 10208

Typescript is updated using the following command:

npm install typescript -g

And latest version 2.4.2 is installed correctly and I can verify it by looking the path shown by folloing command:

npm list typescript -g

but the following command shown older version (1.0.3.0) :

tsc -v

Also looked in TEMP variable and it points to the same path as it showed by npm list.

Also running where tsc in command prompt doesn't show anything and doesn't come up with any error.

6 Answers

On windows, Open the command prompt and type: where tsc

This will give you a list of typescript versions your PATH and global settings are pointing to.

Go to the path: C:\xxxxx\Microsoft SDKs\TypeScript

Then delete the older version folder except latest one. Then check your current version again.

Have a good day!

Remove the TypeScript folder from C:\Program Files (x86)\Microsoft SDKs.

If you are using IntelliJ IDE try:

Preferences > Language & Frameworks >Typescript

and change Typescript select field to the correct path.

the old typescript version must be on that address on windows computer, C:\Program Files (x86)\Microsoft SDKs\TypeScript

so all you have to do is to go to that address by going into c:\ drive and then into program files (x86) folder and then find Microsoft SDKs folder and you will see the typescript folder,you can just cut or delete the folder from there and then come back to cmd and write the path for typescript and it will show you the new path and the latest version.

Related