I'm trying to install this npm package. As it's said in the instructions, I should do
npm install angular2-websocket
which gives me this:
angular-quickstart@1.0.0 /home/me/dir
├─┬ angular2-websocket@0.9.0
│ └── bluebird@3.4.7
├── UNMET PEER DEPENDENCY reflect-metadata@^0.1.8
├── UNMET PEER DEPENDENCY rxjs@5.0.0-beta.12
├── UNMET PEER DEPENDENCY typescript@2.0.10
└── UNMET PEER DEPENDENCY zone.js@0.7.6
As I've researched, these peer dependencies are dependencies that must be manually installed, but there's no mention about them in the README
. I left as it is.
Then comes the usage section, before the compile section, so I don't know what I should do. But I compiled anyways, and I got no errors. I just did as it says in the README
:
npm run typings
npm run compile
When I try, however, to compile a test file that just imports the angular2-websocket library, I get:
node_modules/angular2-websocket/angular2-websocket.d.ts(36,30): error TS2304: Cannot find name 'Promise'.
../../node_modules/rxjs/Observable.d.ts(69,60): error TS2304: Cannot find name 'Promise'.
../../node_modules/rxjs/Observable.d.ts(69,70): error TS2304: Cannot find name 'Promise'.
If Promises are available even in browsers, then why the name isn't found? Also, why the packages to this library are listed as peer?