unable to find newEventHub function
I think they've replaced the EventHub class with ChannelEventHub.
You can update the invoke.js file with following:
on line 105:
let event_hub = channel.newChannelEventHub('localhost:7051');
// event_hub.setPeerAddr('grpc://localhost:7053');
on line 130:
console.log('The transaction has been committed on peer ' + event_hub.getPeerAddr());
That should fix it.
Change the fabric-client npm version from "unstable" to ^1.2.1 in package.json and run npm install