12,853 questions
0
votes
0
answers
35
views
Cannot find module '../../prisma/generated/main/index.js' while starting NestJs Project?
I have two Prisma schemas like this:
Schema1 Generator:
generator client {
provider = "prisma-client-js"
output = "./generated/main"
}
Schema2 Generator:
generator client {
...
-1
votes
1
answer
25
views
UndefinedDependencyException [Error]: Nest can't resolve dependencies
I'm working on a NestJS project with GraphQL, and I'm facing a dependency injection issue.
When trying to inject WalletService into RefundService, NestJS throws the following error:
[Nest] 8016 - 29/...
0
votes
0
answers
53
views
Cookies are not always sent to the browser (they are one minute the next they're not) [closed]
I am working on a NestJS app, and I am using JWT access and refresh tokens. I am trying to use cookies to store my tokens, and when the app runs, the refresh API is called globally, so it would ...
0
votes
0
answers
9
views
Sequelize sync still running the alter queries even when alter is false
await sequelize.sync({ alter: false, force: false });
My expectation and also as per the sequelize documentation this will only create the new tables if not present, it will not run any alter query.
...
0
votes
0
answers
39
views
Nest.js. Swagger. How to split swagger docs into 2 documents: for clients and admins
I'm using NestJS (v11) and @nestjs/swagger (v11.0.3).
I have a modular app structure where some controllers are intended for public clients (mobile app, frontend) and others are intended for admin ...
0
votes
0
answers
25
views
How to assign validation result to a field using class-validator in NestJS?
I am working on a NestJS project where I use class-validator to validate incoming DTOs. I have a custom validator @IsAccessPointExists() that checks if an access point exists in the database. The ...
0
votes
2
answers
36
views
confusion between import in NestJS with global module implementation
I have a confusion regarding the implementation of a global module in NestJS, and the import of a shared service
I'm following this guide: NestJS- Global Modules
and this is what I have so far:
shared....
0
votes
0
answers
31
views
+50
Replication: new Aurora MySQL read replicas aren’t picked up by TypeORM after autoscaling
Environment
TypeORM: 0.3.20
@nestjs/typeorm: 10.0.2
Node.js: v22.13
Database: AWS Aurora MySQL 8.0 (provisioned cluster with autoscaling read replicas)
Description
We have a single “read” endpoint ...
0
votes
0
answers
22
views
How to implement resource-based subscription limits (max items per plan) in NestJS?
I have a system where each plan defines limits on how many resources a user can create (e.g. max_items, max_entities, etc.).
I need to enforce these limits when users try to create new resources.
What’...
0
votes
0
answers
20
views
Using AdminJS in NestJS, nothing is showing on deployment, getting 404 not found
I just installed adminJs in my nestJs application. After going through all the difficulties and following the work around, the nestJS app runs without issue but when going to the adminJS default route ...
0
votes
0
answers
39
views
How to use ngrok with NestJS and NextJS
I have NestJS app for backend and NextJS for frontend. I use ngrok for my backend URL and in my frontend I fetch the data like this:
return axios
.get<Exam>(`${process.env....
0
votes
1
answer
31
views
NestJS ValidationPipe with ValidateIf not preventing conditional field validation
I'm building an accounting application using NestJS. I have a DTO called CreateTransactionDto, and I want certain fields to be required or forbidden based on the value of transactionType. For example:
...
0
votes
1
answer
51
views
Connect to your Dockerized MongoDB with transactions enabled
When I activate transactions on my MongoDB database, which is Dockerized (for local development and tests purpose), I can't connect to it any more, I get an error in the console from my NestJS app.
...
0
votes
0
answers
37
views
How to prevent path traversal?
I recently found a path traversal vulnerability in my NestJS application.
I had a download middle-ware that would take the filename from the URL:
async use(req: Request, res: Response) {
const ...
-3
votes
0
answers
57
views
Puppeteer with React - can't fetch data (nextjs)
I have the following page on my website:
'use client';
import { useExam } from '@/api/exam/hooks';
import { Suspense } from 'react';
export default function ExamPdfPage({
params: { id },
}: {
...
0
votes
1
answer
72
views
Connection refused error (127.0.0.1:4566) for Localstack S3 in NestJS
I'm quite new to AWS and docker.
In my local development environment, I want to upload files from the app server and place the files in localstack s3.
However, when I try to access localstack s3 from ...
-1
votes
1
answer
44
views
I want to create an API where I can have an optional param in Nest.js
If you look at the repository, I have a logic if a categoryTitle is not passed as a parameter it executes a code. Therefore, from the component end I should be able to call it like this without ...
0
votes
0
answers
26
views
How to create generic types in a mongoose schema
I'm trying to create a nest Schema for mongoose that uses typescript's generic types.
The goal here is to restrict my database with a few types (everything will be validated with Joi or equivalent, ...
1
vote
0
answers
23
views
How to handle high-concurrency job processing with BullMQ and NestJS?
I'm currently working on a medical appointment platform (built with NestJS and Redis) that handles over 300 daily active users. One of the key features is the asynchronous processing of appointment ...
0
votes
0
answers
34
views
Share TypeORM entities and services across multiple NestJS apps via a private library
I'm trying to build a shared private library to reuse TypeORM entities and some common services across multiple NestJS applications without duplicating code.
For simplicity, let's say my shared ...
1
vote
0
answers
37
views
NestJS UnknownDependenciesException in some services in monorepo after NestJS update
I'm experiencing a problem within my pnpm+nx based monorepo. I updated nestJS from Version 7 to 11. Since there are quiet a few versions between those two I made sure to update the dependencies like ...
0
votes
0
answers
38
views
"Nest could not find XXXX element (this provider does not exist in the current context)" when configuration is correct
I have a monorepo that incorporates NestJS (standalone app), NextJS (app router), tRPC and React Query (to connect the backend to the frontend)
While the configuration I'm 100% sure is correct, I'm ...
1
vote
1
answer
58
views
Can NestJS implement an endpoint with an $ (dollar sign) prefix?
Trying to implement an endpoint in NestJS 10 that conforms to https://www.hl7.org/fhir/R4/operationslist.html and provides an operation via a $ sort of pattern.
Tried using:
@Controller({
path: '$...
-1
votes
0
answers
46
views
How to solve error `process exited with code 3221226525`
I have crexport.exe file for cmd utility
suppose i run this utility through cmd prompt with valid parameters and formulas and database connection it generate pdf successfully but when i try using nest....
1
vote
1
answer
32
views
AWS ingress controller Keepalive timeout
I am running a Aws EKS cluster with Load balancer and Ingress Controller. When I call an API in NodeJs service which I am running as pod in EKS cluster its returning 499 error. When The API call takes ...
0
votes
0
answers
15
views
I can't validate the Apple subscription in NestJS
I've created an endpoint in my app that allows me to send the user ID and Apple receipt to validate the subscription directly in my app.
I'm using node-apple-receipt-verify
But I'm getting the ...
0
votes
0
answers
43
views
Issues trying to use nestjs+rabbitmq
I'm trying to communicate my microservices using rabbitmq(a docker container of that service). So every time I run my app it deliver
[Nest] 18 - 04/12/2025, 12:58:29 PM LOG [NestFactory] Starting ...
0
votes
2
answers
23
views
Nest js deploying on MonsterASP
I'm currently working on deploying a NestJS application on MonsterASP and would appreciate any guidance or shared experiences from those who have undertaken a similar task.
What I've Done So Far:
...
1
vote
0
answers
26
views
Nestjs DI goes wrong for some reason
While going through some course in nestjs and trying to implement the Hexagonal Architecture,
I faced this Dependency Injection issue.
I am new to nestjs and I made sure that my code is exactly the ...
0
votes
0
answers
12
views
Nestjs E2E Test - Module not found
I am trying to run e2e test case in Nestjs project which has multiple modules, but getting the below error.
It seems to import a service like a module
Cannot find module 'src/helper/helper.service' ...
1
vote
0
answers
46
views
NATS communication issue between NestJS (gateway) and Spring Boot (microservice) using request-reply pattern
I'm implementing a microservices system where a NestJS gateway communicates with a Spring Boot microservice using NATS as the message broker.
The issue is that when I send a message from my NestJS ...
0
votes
0
answers
37
views
Should I Use Separate Authentication Flows for Users and Stores in My Backend
I have two entities: User and Store.
Users log in with email/password.
Stores access a POS app using a 6-digit token.
Should I:
Create separate authentication flows (Users: email/password, Stores: ...
0
votes
1
answer
11
views
Accessing variables passed into JestCLI - NestJs, Integration Testing
I'd like to use Jest as a testing framework to kick off a suite of Integration tests, and inside each test, I need to access a SALT - which will be passed in via a HTTP request, the same request which ...
0
votes
1
answer
34
views
NestJS cross-DTO class validator
I'm trying to build a validator/decorator to validate one DTO attribute based on another DTO attribute value. I need to validate if availability.saleDate is before details.date.
The problem I'm having ...
-1
votes
0
answers
44
views
NestJS App can't connect to postgres in docker
My NestJS app cannot connect to postgres in Docker. Running the app from outside docker to postgres in docker works.
Hostname in docker nestjs app is db and hostname when running app from outside ...
0
votes
0
answers
26
views
Okta Redirects to Dashboard Instead of My App (SP) After "Sign in with Google"
I'm using a custom SAML login flow in my app with passport-saml and MultiSamlStrategy (Node.js/NestJS). Each org can upload its own IdP metadata (Okta, Microsoft, onelogin), and everything works fine —...
0
votes
1
answer
53
views
Request body of multiple file uploads in multipart formdata with unique metadata
I'm working on a NestJS app and in it, one route has file uploading in it. I am uploading the file and its metadata using form-data. Right now, I am able to upload just one file at a time and the form-...
1
vote
2
answers
45
views
NestJS - Best practices for handling TypeORM migrations
I've been having problems lately with keeping DBs of different environments in sync,
and am searching for the best practices to handling TypeORM migrations. A few questions that came up are:
Should i ...
0
votes
1
answer
21
views
TypeORM describe command fails on specific entity while working on others
I'm using TypeORM with NestJS and have created a database with 4 entities. The describe command works for all entities except the Group entity.
ERROR: ERROR 1064 (42000): You have an error in your ...
0
votes
1
answer
32
views
How to add different namespace clients to the same room?
I created two socket.io namespaces because there is an agent and customer in chat application and their handleConnection, handleDisconnect functions and etc. are different. That is why I separated ...
1
vote
0
answers
44
views
Issue with i18n Translation in NestJS + GraphQL
Title:
NestJS + GraphQL i18n Translations Not Loading Correctly
Description:
I am working on a NestJS + GraphQL application and trying to set up internationalization (i18n) using nestjs-i18n. However, ...
0
votes
0
answers
38
views
Entity Manager is undefined
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
load: [
serverConfigRegistration,
databaseConfigRegistration,
...
0
votes
0
answers
23
views
NestJS Archiver Stream Fails for Large Files (Takes Too Long & Times Out)
I'm using NestJS and the archiver package to zip files in a streaming approach. The goal is to stream the zip archive either:
Directly to Google Cloud Storage (GCS)
Or to a Buffer (local testing)
...
1
vote
0
answers
61
views
ethersjs disconnects websocker after a while
I'm using ethers.js to handle functions and listen events on ethereum for both mainnet and sepolia. I'm also using Alchemy as RPC provider.
I have created a service:
import { Injectable } from "@...
0
votes
0
answers
24
views
How to use TypeORM with generic types?
I create a Nest project with many generic entities.
I have two abstract classes :
@Entity()
export abstract class GenericEntity {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
name: ...
0
votes
0
answers
34
views
How to configure a @nestjs/graphql shim for Metro bundler (Expo app)?
I am trying to implement the "code-first" approach to use GraphQL from a NestJS module, with the intention that the TS models would directly be be usable by my front end Expo/React Native ...
1
vote
1
answer
35
views
class-validator whitelisting properties of object inside array
I´m trying to validate the body of a route on NestJS and i´m using the class-validator package, my route is receiving the data as multipat because this route also accepts a file upload. Here is the ...
0
votes
0
answers
39
views
RabbitMq with multiple consumers and publishers in nestjs
I have a NestJS app that connects to RabbitMQ and communicates with a Java Spring app. The app needs to both publish to and consume from multiple queues, including cases where it publishes to and ...
0
votes
1
answer
67
views
NestJS Permission Guard with Interceptor
I have a permission guard responsible for validating user permissions.
Login Types
I have two types of login in my system:
User Login: A standard login where users authenticate using email and ...
0
votes
0
answers
26
views
ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)... error: role "7am-club" does not exist
The database is running in Docker, but I keep getting this error when start the app with the command 'npm run start'
Here is my database configuration :
import { Module } from '@nestjs/common';
...