Category "nestjs"

NestJS Share e2e server between test suites

I'm using NestJS test module to mock the nest app and I want to share this app among various test suites. Here's my setup: test |_ helpers |_ testApp.ts

Injected nestjs service in to CQRS is undefined

I have a service to import in CQRS but in runTime, I got an error for the service method the service declared in constroctor and using it in excute methode @Com

Cannot read property 'byteLength' of undefined for aws-sdk js v3 for dynamodb client

I'm trying to connect a nestjs backend (node) with a dynamodb table using @aws-sdk/client-dynamodb but I have a server error: [Nest] 24019 - 24/08/2021, 21:19:

Connect to a Nest.js server inside a docker container

I'm trying to create a container for a Nest.js server. For now,I only have the basic version of the server that creates automatically when you create a Nest pro

How to import directives in a nestJS graphQLModule?

I need to generate typeScript types for mongoDB using graphql-code-generator and the typescript-mongodb plugin, but I don't understand how to import the directi

How to catch 3rd party api error response using NestJS' httpService?

Suppose i make a request using httpService like this const response = await this.httpService .request({ url: 'https://example.com/data', m

Trying to persist not discovered entity of type object

The problem I'm new to Nest.js and Mikro-ORM, which I have to learn as a job requirement. This stack requires TypeScript, which I despise from the bottom of my

Updating Multiple Records with varying conditions in a single query

With Typeorm + NestJS + Postgres is there a way to update multiple records with varying conditions and varying values in a single query. Normally I could do awa

nestjs return undefined in Public Guards

I follow this link https://docs.nestjs.com/security/authentication#enable-authentication-globally I went ahead and create a public guard But it does not recogni

How can i get domain name in Nestjs?

Now, i want to get domain name. I don't want hardcode for path return eg: https://mydomain/url-img. My purpose is when i develop in local enviroment, I can ret

How to upload Files and Other fields with Request Body in Nestjs

I want to upload three fields like: Example Data: partner_id: 3638, review: [{'product_id': 155, 'order_sku_id': 155, 'review_title': 'Orange Review','rating':

Getting 'ReferenceError: describe is not defined' error when going to start the application

I'm going to test typescript(inversify) code using jest. Below mentioned the code that use to test a controller method. describe('Test UserController',() =>{

Nest.JS/Multer: UploadedFile undefined

I've got some strange problem here: I've setup file upload just like in the nest.js tutorials. On my machine (Windows 10) everything works fine but when I deplo

NestJs redirect without response usage

Is it possible to make a redirect from a Nest controller without the usage of the @Response object? For now I know that we can only do this via direct @Response

How to validate an array of Date with class validator?

I have an array of dates in a post request body that I want to validate: { "meals": [...], "dates": [ "2022-03-06T11:00:00.000Z", "2022-

Integrate firebase notificaiton in nest js

I am trying to create fcm API using nest js which I am using in a flutter. I am new to Nest js and I have implemented the code using this. There is no error in

NestJs/swagger: Define ref schemas without DTO classes

I have an app where I define the API response schemas as plain javascript objects according to the open-api spec. Currently I am passing that to the ApiResponse

How to send response from middleware created in a Nest fastify server?

I've created a NestJs project with Fastify, and have created a middleware for it, but I can't figure out how to send a response to the client, similar to how we

Nestjs as API gateway + Moleculer as microservice

I'm very new in microservices, I was a wonder to know that is there any way to call a moleculer action from nestjs gateway?

TypeORM throws QueryFailedError Table already exists on MySQL when synchronize is true

I am using NestJS, TypeORM, and MySQL to build a web application. I am using a .env file to pass in some environment variables for connecting to my local datab