Monthly Archives: November 2016

Angular 2 version 2-1-1 PhpStorm/Webstorm Typescript compile error

Making the jump to Angular 2 version 2.1.1 is pretty straight forward, all was fine when testing the quickstart using the npm lite server, went to run it in PhpStorm/Webstorm and got so many errors:

Error:(46, 34) TS2304: Cannot find name 'Set'.
Error:(44, 38) TS2304: Cannot find name 'Promise'.
Error:(24, 15) TS2304: Cannot find name 'Map'.

Like most things this is an easy fix, this one is caused by an out dated Typescript compiler which some lazy Google Fu brought to my attention see here.

Install type script compiler using npm

npm install -g typescript 

When you run the above command it will tell you the path it has downloaded to, for example:


Then set PhpStorm/Webstorm to use the compiler.

I mainly threw this in a post to note that the tsc files have been moved to the “lib” folder, you will need to link to that rather than “bin”.

File>Settings>Language & Frameworks>Typescript

Set typescript version to the path we created and save, if your not sure where it went run the npm command again.


All done! you should be fine to compile Angular 2.1.1 now.

Angular version: 2.1.1

Typescript version: 2.0.8

Previous Typescript version: 1.8.10