Next.js Discord

Discord Forum

querystring -> 'module-not-found' - I will use amqplib

Answered
Pine Bunting posted this in #help-forum
Open in Discord
Pine BuntingOP
I become this error see on picture.
    async connect(): Promise<void> {
        this.connection = await amqp.connect(process.env.RABBITMQ_URL ?? "");
        this.channel = await this.connection.createChannel();
        await this.channel.assertExchange(this.exchangeName, 'fanout', { durable: true });
        await this.channel.assertQueue(this.queueName, { durable: true });
        await this.channel.bindQueue(this.queueName, this.exchangeName, '');
        console.log('Connected to RabbitMQ');
        this.registerEvents();

        this.channel.consume(this.queueName, this.handleMessage.bind(this), { noAck: false });
    }
Answered by Pine Bunting
this is the solution: npm install querystring net tls stream
View full answer

19 Replies

Pine BuntingOP
Has no one this error too?
English Lop
@Pine Bunting
npm install querystring
try
Pine BuntingOP
i must install querystring, net, stream, tls
English Lop
ok
Pine BuntingOP
thx
English Lop
did u install it?
Pine BuntingOP
yes
English Lop
but same error?
Pine BuntingOP
when i install querystring then comes the same message for net, tls and stream. with this 4 packages its work fine
but why do you want to have them? it makes no sense to me. in other projects it works without the
Pine BuntingOP
yes fixed
English Lop
great!
@English Lop `npm install querystring`
English Lop
is this solution?
Pine BuntingOP
this is the solution: npm install querystring net tls stream
Answer
English Lop
sounds great