-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Labels
Milestone
Description
May you add an example how to use with TypeScript? I tried both:
const io = require('socket.io-emitter')({ host: '127.0.0.1', port: 6379 });
and
import * as socketIoEmitter from 'socket.io-emitter';
const io = socketIoEmitter({ host: '127.0.0.1', port: 6379 });
but i get:
ERROR in ./node_modules/socket.io-emitter/node_modules/redis-parser/lib/hiredis.js 3:14-32
Module not found: Error: Can't resolve 'hiredis' in '/Users/mick/git/myproject/node_modules/socket.io-emitter/node_modules/redis-parser/lib'
Btw. should redis be a peerDependency? I already have Redis in my project (v3) and socket.io-emitter imports v2 so I have two instances running.