I'm trying to walk through the quickstart for Angular2 now when the release candidate is out. However, the typescript compiler throws a lot of errors that I can't figure out.
https://angular.io/guide/quickstart
First a lot of lines like this. node_modules/@angular/core/src/application_ref.d.ts(39,88): error TS2304: Cannot find name 'Promise'. node_modules/@angular/core/src/application_ref.d.ts(99,42): error TS2304: Cannot find name 'Promise'.
and then this...
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "tsc"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! [email protected] tsc: tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] tsc script 'tsc'.
npm ERR! This is most likely a problem with the angular2-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc
npm ERR! You can get their info via:
npm ERR! npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! C:\Development\Angular2RCQuickstart\npm-debug.log
Anyone out there that knows what's wrong?
Easy dirty fix
Copy the typings folder from Angular 2 beta 17 into @angular project so ///<reference path="node_modules/angular2/typings/browser.d.ts"/>
in your top level component works again
Clean fix
You have to manualy install the typings for ES6 promise and ES6 collections with typings install es6-promise
use the --ambient
flag for tsd (deprecated) typings.
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