I have a MacBook Pro with OS X 10.8.2 Some time ago I installed Typescript and today I'd like to upgrade that installation to the latest version available (so far, v0.8.3). I wrote this command from the terminal:
sudo npm install -g typescript
But this is what I got on the display:
npm http GET https://registry.npmjs.org/typescript
npm http 304 https://registry.npmjs.org/typescript
/usr/local/bin/tsc -> /usr/local/lib/node_modules/typescript/bin/tsc
[email protected] /usr/local/lib/node_modules/typescript
Does this means that I still have version 0.8.0 installed on my computer?
I tried to see if the tsc command has a -v
or a -version
parameter but I haven't found it, so I still uncertain if I have upgraded Typescript to the latest release or if I'm still stuck with an older version.
Every now and then it is common to see newer package versions, and TypeScript is not the exception. Hence, the version installed locally might not match the current latest version of the package. To install the latest TypeScript version, add @latest when using the same command to install TypeScript.
Test that the TypeScript is installed correctly by typing tsc -v into your terminal or command prompt. You should see the TypeScript version print out to the screen.
Since selected correct answer didn't help me I figured I'd share how I resolved the issue.
I had to remove C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\
from my PATH.
After that I could run this command and see the version I was expecting:
C:\>tsc --version
message TS6029: Version 1.5.3
I had the same problem below procedure worked for me
Update NPM
npm install npm@latest -g
Update typescript
npm -g upgrade typescript
or
npm install typescript@latest -g
now you should see
tsc --version
Version 2.1.5
For those still struggling with that - try running WHERE tsc
in Command Prompt or Node.js Command Prompt and you'll get all the locations it is installed. Remove the excessive location from PATH env var.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With