12,902 questions
-2
votes
0
answers
16
views
How to Generate Reports from MongoDB Community Edition and Integrate Them into a React UI?
I am using MongoDB Community Edition as my database and need to generate reports based on the data stored in my collections. The reports should be query-driven and provide insights such as aggregated ...
0
votes
1
answer
24
views
All the services return as a undefined in Global Interceptor in NEST JS
I am trying to create a global interceptor in NestJS and call a service inside it. I have followed all the documented steps, but all the services used within the interceptor are still returning as ...
0
votes
0
answers
13
views
Class extends value undefined is not a constructor or null - circular dependency
When I am triying to generate migrations I get this error
Error during migration generation:
Error: Unable to open file: "/home/angel/Contenedores/nestjs/plantilla/src/database/config/typeorm....
0
votes
0
answers
39
views
mysql database doesn't update column (nest js)
I'm implementing a refresh token rotation in my backend, when I log the refresh token version before and after the save it logs them right, the current and the incremented version, however, when i ...
0
votes
0
answers
21
views
SyntaxError: Unexpected strict mode reserved word in nestjs
package.json
{
"name": "nestjs-pinecone-api",
"version": "0.0.1",
"description": "NestJS API with Pinecone integration",
"...
0
votes
0
answers
19
views
NestJS Prisma Generated Types Not Included in dist folder
I'm working on a NestJS backend and using Prisma for my database. I generated my Prisma type with the following configuration:
generator clientTypes {
provider = "prisma-client-js"
...
0
votes
1
answer
25
views
dockerized Nestjs app not running on Digital ocean App Platform [closed]
I am using DO App platform and I try to run the docker image that is the one below:
FROM node:20-alpine AS base
RUN apk add --no-cache openssl
RUN npm i -g pnpm
FROM base AS dependencies
WORKDIR /app
...
0
votes
0
answers
25
views
Cannot create a reservation of a workspace, getting the error code 8201 when using Zoom API
I'm developing a website that connects to the Zoom API using a server-to-server oAuth connection. After successfully obtaining an access token, I send a POST request to create a reservation for a ...
0
votes
0
answers
39
views
JSON object parsing got broken after upgrading NestJS from 10 to 11
I've got a NestJS application with simple POST endpoint:
@Post()
@HttpCode(HttpStatus.CREATED)
public async create(@Body() model: SerializedModel, @Req() req): Promise<SomeDto> {
const ...
0
votes
0
answers
24
views
MongoDB adapter in PayloadCMS not working
When I use
db: mongooseAdapter({
url:
'mongodb+srv://<user>:<password>@<collection>.eyqv8.mongodb.net/'
}),
in payload.config.ts
that result in error:
./node_modules/@...
0
votes
0
answers
26
views
RabbitMq with nestjs
I want to implement a pub/sub model in nestJs using rabbitMQ. I used the topic exchange for this all the configration is fine. because when i run the system it create exchang queue and routing key but ...
0
votes
1
answer
31
views
Apple Auth in NestJS: "invalid_grant: The code has already been used" Error
I'm integrating Apple Sign-In in my NestJS application using the passport-apple strategy. In my implementation, I extract the authorization code from the request body and then use it to request an ...
1
vote
0
answers
41
views
Module not found with prisma and nest js integration on turborepo
I gave you my repo about the question
https://github.com/stygma-projects/fm-apps/tree/init
I made a monorepo with turborepo. I follow the guideline to make my prisma as an internal package to share it ...
0
votes
1
answer
37
views
Am not able to assign a null to a Type entity
Am new to TypeScript...
user.entity.ts
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
@Entity()
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column()
...
0
votes
1
answer
29
views
What is the best practice for avoiding (or handling) circular dependency in NestJS when needed for table relationships?
I'm working on building an API for a small hackathon project. It will be a platform for teachers to share lesson plans for students.
I created my first table, Subject, to store lesson subjects like ...
0
votes
1
answer
39
views
Nest js union dto types
I have a nestjs dto classes. Use it for response dto.
class A {
response: '1',
prop1: string
}
class B {
response: '2',
prop2: string
}
Everything works
function foo ():A|B {
const result:...
0
votes
1
answer
33
views
Dynamic IP Address Handling in Content Security Policy (CSP) with Helmet in a NestJS Backend
Question:
I am working on a web application with a React frontend and a NestJS backend. The backend uses Helmet to manage the Content Security Policy (CSP).
My frontend needs to connect to an API ...
0
votes
0
answers
22
views
Deploy Nest Js Project + Prisma on Vercel
I am trying to deploy a Nest Js project on Vercel. I get this error
enter image description here
When I look at the logs I see that I get this : enter image description here
I deployed my prisma ...
1
vote
0
answers
49
views
Validating union type with class-validator?
In a NestJS application I bave multiple DTO classes that utilize class-validator.
The controller method expects POST body which can represent any of these DTOs.
class A {
// some validators
}
class B ...
0
votes
0
answers
30
views
Don't understand strange behaviour of nest.js/bullmq
I have a queue that starts a game on the backend and a function handleGameStart, where I change the game’s status in the database (from OPEN to STARTED). I can’t see any console.log or logger messages ...
1
vote
0
answers
37
views
how to pass config to an imported NestJs module
My module AppModule is importing LibModule.
LibModule needs a set of configuration variables e.g. db credentials.
I am using ConfigurableModuleBuilder utility to create a configurable LibModule.
Here ...
2
votes
1
answer
96
views
Error when build NestJS project: util_1.isObject is not a function
I am rebuilding a NestJS project that I could run in 8 months ago, with base on the Dockerfile below
FROM node:alpine as base
WORKDIR /usr/src/app
RUN apk add --no-cache ffmpeg
COPY package*.json ....
0
votes
1
answer
10
views
Nestjs CrudContoller Patch method not updates record
Updating record with nestjs/crud CrudController not updates record
0
votes
0
answers
31
views
Nestjs - OAuth2Strategy requires a clientID option
I've been working on a project using Nestjs and there is an issue that I need support. Basically when I start the project an error that says "ERROR [ExceptionHandler] OAuth2Strategy requires a ...
-3
votes
0
answers
66
views
Docker Javascript "Can't find module" error
When I build my project with Docker, I get an error. I'm building a NestJS API with PostgreSQL and PGAdmin. Every time I deploy the stack, everything works, but when I click on the NestJS container, I ...
1
vote
0
answers
43
views
NestJS API Gateway: GET Works, but POST Requests Hang Indefinitely
I'm building a microservices architecture using NestJS, and I have an API Gateway that proxies requests to different services (Order, Email, User).
Everything works fine for GET requests, but POST ...
0
votes
0
answers
15
views
Error injecting @nestjs-modules/mailer MailerService when publishing a package
I was using @nestjs-modules/mailer in my NestJS API to send emails. As a part of abstraction, common functions and services that are being used by multiple APIs are abstracted out and published as ...
0
votes
0
answers
49
views
mongodb boolean value is not updating
I am trying to update "has_signed" value to true but its not working note that my table model structure is like this:
export interface AdminOffersInterface {
//other fields
seller: [{
...
0
votes
0
answers
35
views
NestJS: Validations don't work with GraphQL Mutations
I am learning how to use NestJs with GraphQL but I am stuck with validations. I had a CreatePostInput (Dto) with some validations using class-validator library but none of the validations work when I ...
0
votes
0
answers
43
views
How do I get NestJS microservice to communicate with RabbitMQ in Kubernetes
Setting up my development environment with Docker compose is really simple. However I am trying to setup the same project with Kubernetes. To make things simple I have broke down the setup to a single ...
0
votes
2
answers
59
views
SequelizeModule — autoLoadModels / [Nest] ERROR SequelizeModule Unable to connect to the database. Retrying
I'm learning Nest.js, I'm trying to connect via SequelizeModule to my local postgres database, but I keep getting this error
Error when starting start:dev
[20:41:14] Starting compilation in watch mode....
-1
votes
1
answer
45
views
monorepo nx (nestjs & react) deploy on vercel
I have a problem with my NX monorepo. I can't deploy my nestjs api on vercel, while the front is well deployed.
I have either 404 errors or servless errors that I don't understand.... Because when I'm ...
0
votes
0
answers
32
views
What is the best practice method for automatically refreshing user's Keycloak access tokens with React + NestJS?
I have an application that uses Keycloak SSO for authenticaton. I have a confidential client registered on Keycloak. At the moment, for each HTTPS request from my front end to back end, I send the ...
0
votes
1
answer
79
views
MikroORM: SyntaxError: Invalid or unexpected token
I'm running into a problem getting my NestJS app to work - SyntaxError: Invalid or unexpected token.
[12:12:51 PM] Starting compilation in watch mode...
[12:12:52 PM] Found 0 errors. Watching for ...
0
votes
0
answers
23
views
Socket.IO to().emit() works locally but not on EC2 behind an ALB (WSS configured)
I’m using NestJS with Socket.IO and RabbitMQ. Locally, everything works as expected: when the client emits a send_message event, the server processes it and then sends a receive_message event to the ...
0
votes
0
answers
50
views
How to calculate the uptime of an AWS EC2 instance from the time it entered the "running" state?
Can somebody guide me in calculating the uptime of an AWS EC2 instance from the time it entered the "running" state, excluding the time spent in "pending" or "starting" ...
0
votes
0
answers
36
views
Nestjs, passport refresh access token strategy, graphql context
I use nestjs with graphql and passport with fastify adapter. I try to implement refresh token logic as additional logic to local strategy.
My problem is: when i set passReqToCallback to true, in my ...
0
votes
0
answers
43
views
What's the best way to create a standard response DTO in nestJS and show it in the swagger docs?
I'm trying out NestJS and there are a lot of things I like but there are a couple things I'm confused about as well. Nest uses DTOs for validation and handling the data throughout the request response ...
0
votes
0
answers
20
views
NX / NestJS misconfiguration when using nest-commander
This is my first time using NX and I've found a problem related to NestJS under NX monorepo.
I'm using NX 20.4.2, NestJS 10.0.2 (installed via @nx/nest plugin) and yarn 1 as package manager.
I've ...
0
votes
0
answers
31
views
Jest Test Coverage Missing for Ternary Conditions in getAllOrdersOrderedByDateDescFindOptions Function
I am testing the function getAllOrdersOrderedByDateDescFindOptions in my admin-find-options.helper.ts file using Jest. The function includes ternary conditions to dynamically build a where clause ...
1
vote
1
answer
30
views
RabbitMQ error to read message using nestJs
I'm trying to consume a message from the admin RabbitMQ page to my nestJs project, for some reason, I just got the error :
ERROR [Server] There is no matching event handler defined in the remote ...
1
vote
0
answers
17
views
Repository triggers first and then decorator
I have nest.js project, where i have decorator which is getting records of images by the id what is provided.
import { AfterLoad } from 'typeorm';
import { AppDataSource } from 'src/config/ormconfig';
...
0
votes
0
answers
33
views
NestJS Dependency Injection Error: "Can't resolve dependencies of CriticalDataElementService"
I'm encountering an issue with NestJS dependency injection, where Nest can't resolve dependencies of CriticalDataElementService due to UserService at index 1.
Error:
Nest can't resolve dependencies ...
0
votes
0
answers
44
views
ParseDatePipe in NestJS
Has anyone actually gotten ParseDatePipe to work?
If so, could you share an example?
Here's my failure:
async declared(
@Query('date', new ParseDatePipe()) date: Date = new Date(),
@Query('...
1
vote
1
answer
46
views
Having problem with adding module and service injection
I have user module and auth module in my nest project.
everything is working but, when am trying to inject auth service in to the user service am getting this error:
**Error: Nest can't resolve ...
0
votes
1
answer
23
views
How to define html response in a NestJs-generated Swagger document
I'm wondering if there is any way to define a html response in a nestjs project. I've a request that returns an html. I use to work with @ApiOkResponse(response) to generate the swagger when is a ...
0
votes
0
answers
17
views
How to have the search term also work on the referenced models in mongodb
I am trying to write a service which should be also capable to search across the referenced model. i.e,
async getAllSubmissions(
paginationDto: PaginationDto,
sortDto: SortDto,
...
1
vote
2
answers
75
views
Typescript build error after tsconfig changes?
I am working with NestJs and Typescript 4.7.4. I am having an issue when Architecture team decide to update tsconfig like this
compilerOptions: {
"target": "es2020",
...
}
to
...
0
votes
2
answers
46
views
Encountering PRECONDITION_FAILED Error (Code 406) in RabbitMQ When Sending Large Messages
I'm working on a project where I need to send large messages through RabbitMQ. However, I'm encountering the following error:
I am using NestJs microservices
"err": { "code": ...
0
votes
0
answers
21
views
is it possible nestjs+sequelize@7?
I can't import @sequelize/core/decorators-legacy when using nestjs(commonjs) + sequelize@7
because of nestjs must set module type to "commonjs"
and sequelize@7 must set module type to "...