Category "nestjs"

NestJS gRPC Unimplemented Streaming Server Method

I'm trying to build microservice with NestJS and gRPC. It has two services, the first one is the gRPC service, and the second one is the REST service that call

NestJS - [TypeOrmModule] Unable to connect to the database. Retrying ER_PARSE_ERROR

Cannot able to connect database with correct connection info, followed documentation to connect database from https://docs.nestjs.com/techniques/database Databa

nestjs event-based messaging with 1 producer and 2 consumers

With nestjs microservices, you can send messages and receive the result using request/response-based approach. That is implemented with a combination of @Messag

NestJS controller not mapped

So I have an API that will be deployed in a docker container. This API has the authentications controller, simple and not something special. When I start up th

Can't define entity in controller's unit test

I want to write a unit test for a controller in NestJS which uses the service. Service uses an entity and typeorm to getting data from postgres. controller.spec

Jest test stuck on bitbucket pipelines without any error

We use Bitbucket pipelines in our CI for testing, Our application is NestJS with Typescript tested with Jest. We always got all tests running, however few days

NestJs/Graphql: "CustomObject" defined in resolvers, but not in schema

I'm having an issue after updating nest/core/common/graphql, in which a single type definition is not showing up in the schema. I'm consistently getting an erro

SetMetadata changes guard execution order nestjs

when i include @Permissions('read') my acessGuard stops receiving JWT info, @Permissions simply sets metadata (code below) export const Permissions = (...permis

UnhandledPromiseRejectionWarning: Error: You must `await server.start()` before calling `server.applyMiddleware()` at ApolloServer

I am trying to start my nestJs server and It keeps giving me this error: UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling s

missing credentials in NestJs Passport

I've built an NestJS API with authentification. I'm using NestJS passport and I create a JSON web token when a user logs in. I've done numerous searches and I r

NestJS: Is it possible to call a third party API inside a guard?

I have create a guard to verify Okta tokens in my guard.However to verify there is another external api that needs to be called.Is it possible and advisable to

What data is needed to connect Elasticsearch module to Nestjs?

I have a problem that when running a project on nestjs and elastic an error is displayed nestjs_api_dev | ConfigurationError: Missing node(s) option nestjs_api

TypeORM SUM Operator on Relation's field

I am a student trying to develop a music library just to try out new technologies. Currently I use NestJS together with TypeORM as my backend technologies (as w

How to use moment in nestjs application

I want to use momentjs in a nestjs app, and also be able to test my services. So I provided momentjs as below in my module providers: [ { provide: '

Nest.js is giving cors error even when cors is enabled

I am developing a next.js application with nest.js as the backend. Now, I am having cors error even when I have cors enabled in my main.ts file of nest.js. Here

how to handle errors in exception filters with Fastify NestJs?

Im using the following code to catch error in fastify, however my error is that "response.send" is not a function: What's the right way to send the error on my

TypeORM Entity in NESTJS - Cannot use import statement outside a module

Started new project with 'nest new' command. Works fine until I add entity file to it. Got following error: import { Entity, Column, PrimaryGeneratedColumn

Optimise multiple api requests with Promise.all()

I'm trying to optimise multiple made to an 3rd party API (Spotify) in my NestJS API. My code is working but I do not find a way to optimise it. @Get('') async

NestJS app build with docker can't access postgres database in the same docker network: ECONNREFUSED 127.0.0.1:5432

I want to run my app on my local machine within Docker. I don't want to optimize the size of my docker app or build it for production now. Docker builds my back

nx dep-graph not showing any relations

I have this Angular/NestJS monorepo powered by NX, and I decided to make better use of NX by organising more stuff into libs, but before I do so, I want to make