GithubHelp home page GithubHelp logo

Comments (5)

i-kitaev avatar i-kitaev commented on August 11, 2024 1

Thanks your :)

from nestjs-rmq.

AlariCode avatar AlariCode commented on August 11, 2024

@vnkitaev, thanks for report, I'll check with latest version of NestJS.

from nestjs-rmq.

AlariCode avatar AlariCode commented on August 11, 2024

@vnkitaev, tested with:

"dependencies": {
    "@nestjs/common": "^5.3.6",
    "@nestjs/core": "^5.3.6",
    "@nestjs/microservices": "^5.3.6",
    "@nestjs/testing": "^5.0.0",
    "@nestjs/websockets": "^5.0.0",
    "nestjs-rmq": "0.1.1"
  },

No error. Everything seams fine.

Could you provide actual code, that causes this error?

from nestjs-rmq.

i-kitaev avatar i-kitaev commented on August 11, 2024
await NestFactory.createMicroservice(ApplicationModule, {
      strategy: new ServerRMQ({
        urls: ['amqp://guest:guest@localhost:5672'],
        queue: 'test',
        queueOptions: { durable: false }
      })
    });

await this.app.listen(3000);

ApplicationModule is empty.

2018-09-11 22 18 40

2018-09-11 22 19 40

If the callback is optional, maybe add check is callback a function?

private async start(callback?: () => void) {

from nestjs-rmq.

AlariCode avatar AlariCode commented on August 11, 2024

@vnkitaev, I updated package to 0.1.2 and added additional check if callback is a function. Now your error must be gone. But NestJS insists, that callback must be a function. Even if I set it to number, listen() still warn about error:
image
When you start microservice you don't specify any port: https://docs.nestjs.com/microservices/basics

import { NestFactory } from '@nestjs/core';
import { Transport } from '@nestjs/microservices';
import { ApplicationModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.createMicroservice(ApplicationModule, {
    transport: Transport.TCP,
  });
  app.listen(() => console.log('Microservice is listening'));
}
bootstrap();

But additional check will be ok) Thanks for submitting an issue 👍

from nestjs-rmq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.