Category "nestjs"

node-fetch@3 Not support in nestjs because it is ESM

I can't use the package "node-fetch@3". I just import it and my console will log the error: const node_fetch_1 = require("node-fetch"); ^ E

How to init RouterModule with variable from ConfigService?

I want to use the RouterModule.register(arrayOfRoutes), but I need to build the arrayOfRoutes with a variable from the ConfigService. What is the proper way to

How to mock S3 with jest?

I am tryng to code a test for upload. But i am not understating how to properly use jest.mock('aws-sdk') export class S3Service { private readonly s3: S3;

GraphQL Schema not updated with NestJS (code-first approach)

Pretty new to GraphQL, I am facing an issue with the latest version of NestJS where I am currently trying to add a mutation to a resolver that doesn't show in t

jest unit test mock google oauthClient in nestjs

I am currently doing unit test for the services in Nestjs using Jest, one of which is using the google Oauth service. My goal is to verify the token from google

Upload dynamic multiple files in Nest JS

I'm trying to upload files with dynamic keys, but nest.js needs to know key names. I tried this one: @UseInterceptors(FilesInterceptor('files')) async

Replace _id to id in NestJs + Typegoose

I use NestJs + Typegoose. How to replace _id to id in NestJs + Typegoose? I didn't find a clear example. I've tried something but without any results. @modelOp

Is it possible to validate that one of 2 parameters are present using class-validator?

Using class-validator along with NestJS I want to validate that a user provides either propertyA or a propertyB but they don't need to provide both. Currently,

How to send RPC replyTo - NestJs Rabbitmq

I have a simple NestJs Microservice application that is listening for messages from a Rabbitmq service. async function bootstrap() { dotenv.config(); // TO

How can I mock nest typeorm database module in end to end (e2e) tests?

all. Include details about your goal: I'm trying to mock repository in e2e test Describe expected and actual results: Request to server will not have access

nestjs Docker build error: can not find tsconfig.build.json

here is my Dockerfile: FROM node AS builder WORKDIR /app COPY package*.json ./ COPY prisma ./prisma/ COPY tsconfig.build.json ./ COPY tsconfig.json ./ RUN n

Separate swagger implementation from controller code

I'm trying to document my api in NestJS. I have followed NestJS documentation and it works very well but I would like to know if there is anyway to separate the

Will TypeORM @AfterRemove or @BeforeRemove entity listeners still run when the db is dropped?

Some entities in my database have a property which is their associated key on AWS S3, for example: // my.entity.ts @Column() s3Key: string; I would like one of