Skip to content

Redis should not be a dependency #89

@MickL

Description

@MickL

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions