Closed JonasSaegesser closed 7 years ago
What is your Node version? node -v
A pull request is appreciated!
It doesn't seem to be necessary, right? https://nodejs.org/api/events.html
I was running an ancient version of node. Sorry about that. Strange that I got that version from the Amazon Linux default package repo.
Hello Everyone
I installed the latest ttn packacke with npm. When I tried to launch your sample app I got the following error: .../node_modules/ttn/dist/client.js:19 this.ee = new EventEmitter(); ^ TypeError: object is not a function
I checked client.js and found the following line: var EventEmitter = require('events');
I changed it to var EventEmitter = require('events').EventEmitter;
and now it is fine. I am not sure why this was working for other users. But I think this should be the right way.
Cheers Jonas