Can't compile the TS
The instructions say npm build: i think they mean npm run build
Then:
sierra:matrix-fb-chat matthew$ npm run build
> [email protected] build /Users/matthew/workspace/matrix-fb-chat
> tsc
src/facebook.ts(27,33): error TS2339: Property 'includes' does not exist on type 'string[]'.
src/facebook.ts(29,27): error TS2339: Property 'includes' does not exist on type 'any[]'.
src/matrix-fbook.ts(32,20): error TS2339: Property 'includes' does not exist on type 'any[]'.
src/matrix.ts(42,21): error TS2339: Property 'includes' does not exist on type 'string[]'.
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script 'tsc'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the matrix-fb-chat 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 information on how to open an issue for this project with:
npm ERR! npm bugs matrix-fb-chat
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls matrix-fb-chat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/matthew/workspace/matrix-fb-chat/npm-debug.log
Do I need a newer tsc?
Ah...it used to be contains() didn't it. I think I might have jumped the gun with includes which is fairly modern. I'll see what I can do to make both v6.4 and v6.9 (mine) happy.
Also, npm build works for me...very odd
f300cc446ae0f375c37a110a077d86f3c32d3993 updates the type definition file to something actually recent in the hopes it will include the right stuff.
Same for me, although my package.json includes "@types/node": "^6.0.52".
#2 will fix the issues above.