FORCE NPM to use latest version of TYPESCRIPT

Re posted from: http://www.davevoyles.com/2016/02/14/how-to-force-npm-to-look-for-the-latest-version-of-typescript/

 

tsc-issue

I recently started using TypeScript for a new project, and hit a few snags along the way. The first of which, was that my local project was using an older version of TypeScript, specifically 1.0.3.0 . This was odd, because I had just installed the latest version of TypeScript, but globally and locally.

I searched around and found this answer on StackOverflow, which was identical to my own problem.

What it came down to was my PATH environment variable was wrong. Windows was constantly referencing an older version of TypeScript which was previously installed on the machine.

I used windows explorer (just hit the win key) and navigated to this address:

C:Program Files (x86)Microsoft SDKsTypeScript

From there, you’ll see several TypeScript folders. Simply rename the oldest version to 1.0.3.0-OLD.

tsc-solution

After that,check for the version of node you are using in your project, and it should reflect this change and now find the latest version installed.

tsc-latest-version

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s