Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'sadd' of undefined #1

Open
gocandra opened this issue Oct 26, 2021 · 2 comments
Open

TypeError: Cannot read property 'sadd' of undefined #1

gocandra opened this issue Oct 26, 2021 · 2 comments

Comments

@gocandra
Copy link

gocandra commented Oct 26, 2021

i'm trying to connect to redis but i keep hitting this error message:
TypeError: Cannot read property 'sadd' of undefined at /bus-starter/node_modules/@node-ts/bus-redis/dist/redis-transport.js:101:40

here is how i'm using it
`import { Container } from 'inversify'
import { BusModule } from '@node-ts/bus-core'
import { LoggerModule } from '@node-ts/logger-core'
import { WinstonModule } from '@node-ts/logger-winston'
import { HandlersModule } from './handlers/handlers-module'
import { BusWorkflowModule } from '@node-ts/bus-workflow'
import {
BUS_REDIS_SYMBOLS,
BusRedisModule,
RedisTransportConfiguration
} from '@node-ts/bus-redis'
import {
BUS_POSTGRES_SYMBOLS,
BusPostgresModule,
PostgresConfiguration
} from '@node-ts/bus-postgres'

const redisConfiguration: RedisTransportConfiguration = {
queueName: 'accounts-application-queue',
connectionString: 'redis://127.0.0.1:6379',
maxRetries: 3,
}

const postgresConfiguration: PostgresConfiguration = {
connection: {
connectionString: 'postgres://xxxxxxxxxxxxxxxxxxxx/postgres'
},
schemaName: 'workflows'
}

const container = new Container()
container.load(new LoggerModule())
container.load(new BusModule())
container.load(new WinstonModule())
container.load(new BusWorkflowModule())
container.load(new HandlersModule())
container.load(new BusRedisModule())
container.load(new BusPostgresModule())

container
.bind(BUS_REDIS_SYMBOLS.TransportConfiguration)
.toConstantValue(redisConfiguration)

container
.bind(BUS_POSTGRES_SYMBOLS.PostgresConfiguration)
.toConstantValue(postgresConfiguration)

export default container`

what am i doing wrong? I can connect to the redis instance, and it works for a bullmq implementation i have laying around.
any guidance is appreciated!

@gocandra
Copy link
Author

so the issue seems to be that
import { RedisTransport, RedisTransportConfiguration } from '@node-ts/bus-redis'
RedisTransport does not seem to be exported. i've cloned the new project at https://github.com/node-ts/bus.git
but redis is not there, i'll try and add it myself and see if i can get it going.

@gocandra
Copy link
Author

where can i find the package @node-ts/bus-test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant