All Questions
Tagged with typescript nestjs
3,662
questions
1
vote
0
answers
19
views
Unable to Resolve Dependencies from EntityRepository in TypeOrmModule. But EntityRepository doesn't exists
I am working on a NestJS project that uses TypeORM. Currently implementing a data feed in the 'command handler' pattern so each user has a customized output from the same endpoint.
Error Message
- [...
0
votes
0
answers
13
views
Error Exporting Enum from NPM Workspace in Angular-Nest Project
I'm working on an Angular-Nest project using a monorepo structure with multiple workspaces. I am trying to export an enum from the types workspace and use it in the server workspace, but I'm ...
0
votes
1
answer
38
views
Why do I have to include another key to save db entities linked to another entity?
I am building a NestJS RESTful API for a library. I have a Book entity and a Category entity. Each book has a category.
Book entity
@Entity()
export class Book {
@PrimaryGeneratedColumn()
id: ...
-1
votes
0
answers
20
views
Is it possible to write purely oop code in express in typescript? [closed]
I was trying to write pure oop code in the express backend as I am using typescript but I was confused that is it possible to use the pure oop in my backend ?
I tried to learn using oop but got no any ...
-2
votes
0
answers
20
views
Trouble using Post method in nest js
I used dto to recieve data with object with post in nestjs typeorm
@Post(':userId/charge-amount')
@HttpCode(HttpStatus.OK)
async chargeUser(
@Body() chargeAmountDTO : ChargeAmountDTO,
...
0
votes
0
answers
16
views
NestJS & Jest: The presence of jest.config.ts causes "strange behavior" during build
I have a Nestjs service inside my monorepo project with the following structure:
/
- package.json
- packages/
- - frontend/
- - backend/
- - backend/package.json
backend is the nestjs service, ...
0
votes
1
answer
33
views
error in typescript while importing the p-retry library
I have found a lot of similar posts, but, I've not found one specifically for this scenerio (for p-retry) where, the library does provide it's own type-definitions, and has sample documentations doing ...
0
votes
1
answer
29
views
How to select and enter all role names (separate column) in the incoming data field as an array in typeorm query
I have a typeorm library using nestjs and a mysql database which has a table user, user_roles (many to many) and roles. I also have a user who already has the super_admin role.
const users = await ...
0
votes
0
answers
33
views
How scalable real-time collaborative whiteboard persists with data?
Planning to implement a scalable real-time collaborative whiteboard but don’t know what architecture to use in order to keep the users persistent without slowing down the application. The application ...
1
vote
1
answer
32
views
Async providers with nestjs
I am running nestjs and I want to make an async provider. Here is my folder structure
.
├── dist
│ └── main.js
├── libs
│ └── dma
│ ├── src
│ │ ├── client
│ │ │ ├── client....
0
votes
0
answers
28
views
How to disable overriding of env variables in Nest.js Config Module
Im using @nestjs/config alongside env-var for managing my configuration in Nest.js. However, when I specify env variables in [load] function for ConfigModule with the same names as environment:
...
0
votes
2
answers
38
views
Use Response object in service Nestjs
I have this controller
@Post('/login')
async login(@Res() res: Response, @Body() body: LoginDto) {
try {
const user = await this.authService.login(body);
return ResponseUtil.success(...
0
votes
1
answer
41
views
How to set DTO props as optional, but never allow all of them null?
I'm trying to apply a validation using class-validator to make possible that some props can be @IsOptional, but if all of them is null, throw an exception.
Thinking in some approach like this:
@...
1
vote
0
answers
39
views
How to inject circular referenced factory providers?
I have this folder structure:
.
├── libs/
│ └── dma/
│ ├── client/
│ │ ├── client.module.ts
│ │ └── client.service.ts
│ ├── cmts/
│ │ ├── cmts.module.ts
│ │ ...
0
votes
1
answer
28
views
Injecting nested services
I have this folder structure:
.
├── lib/
│ └── dma/
│ ├── modules/
│ │ └── cmts/
│ │ ├── cmts.module.ts
│ │ └── cmts.service.ts
│ └── dma.module.ts
└── ...