Build: Cannot find name Promise - Visual Studio 2015 w/ MVC6 and Angular 2 Build: Cannot find name Promise - Visual Studio 2015 w/ MVC6 and Angular 2 angular angular

Build: Cannot find name Promise - Visual Studio 2015 w/ MVC6 and Angular 2


The REASON for this is that you are targeting ES5, which does not have Promises. If you change to ES6 the error will magically disappear.

If you do need to target ES5, just use the es6-shim mentioned with previous answers.


I just ran into this exact same issue after updating es-promise from 3.0.2 to 3.1.2. I ultimately ended up installing the newer version of nodejs with a newer version of npm and then deleted my node_module folder and reinstalled the packages. I then added the reference path to the main.ts or boot.ts (whatever you named it) file. That fixed it.

Just like Steve said.

///<reference path="../../node_modules/angular2/typings/browser.d.ts"/>


This solved it for me, using Angular 2.0.0-rc.1:In the class where you're bootstrapping Angular, put this line on top:

/// <reference path="../typings/browser/ambient/es6-shim/index.d.ts"/>