Questions tagged [nestjs-config]

196 questions
0
votes
1 answer

Dockerized Nestjs Accessing static files in the public folder

UPDATED Next to the src folder, I created another folder called public and placed an image file inside this folder. I modified the main.ts file like this: 1) app.useStaticAssets(join(__dirname, '..', 'public')); 2)…
DolDurma
  • 15,753
  • 51
  • 198
  • 377
0
votes
1 answer

Nestjs | cache-manager | TypeError: common_1.ConfigurableModuleBuilder is not a constructor

While I'm trying to implement Nestjs caching in my dummy project, I'm facing the following error:- node_modules/@nestjs/cache-manager/dist/cache.module-definition.js:6 _a = new common_1.ConfigurableModuleBuilder({ ^ TypeError:…
0
votes
0 answers

Update/Override ConfigService singleton in NestJS

I'm facing an issue using NestJS and its ConfigService that I canno't find any solution and also I'm not sure if I'm trying something that it is not built for. I have a global config service that loads the configuration with an external REST API.…
jfgDev
  • 1
  • 4
0
votes
0 answers

how to load config folder in nestjs-config?

I use ConfigService in nestjs my code app.module.ts ConfigModule.forRoot({ isGlobal: true, load: [ databaseConfig, redisConfig, appConfig, ... ], }), too much lines in load property. so how can load one time? how to read folder in loader? my folder…
asd
  • 1
  • 1
0
votes
1 answer

Nestjs with TypeORM - Cannot read properties of undefined / No metadata was found - server starts all routes without error at startup

I am currently trying to build a simple Nestjs Api (Nestjs v9, TypeORM v9, postgres:14-alpine). The application has no logic yet, but already has some routes, as you can see from the output: [12:28:58 AM] Found 0 errors. Watching for file…
r00k13
  • 215
  • 3
  • 15
0
votes
0 answers

problems with unit test nestjs using Firebase Functions locally

[[enter image description here](https://i.stack.imgur.com/dJNjz.jpg)](https://i.stack.imgur.com/SkoTq.jpg) Hello, good evening, could you please help me with a unit test I am doing in NestJS using Firebase Functions locally? I have been reading the…
0
votes
1 answer

Configure Keycloak Adapter in NestJs Backend with Custom Config Service

I have a NestJS Backend. My AmcConfigService wraps the nestjs ConfigService and is part of a AmcServerUtilsModule that includes things that all of my backends need. I want to include the call to the KeycloakConnectModule (nest-keycloak-connect) into…
andymel
  • 4,538
  • 2
  • 23
  • 35
0
votes
1 answer

NestJS: module import troubles

I want to create a NestJS module I will host on my Verdaccio repository and reuse it into multiple projects, specially into guards. This module use the configService of the app where it is imported as a dependency. But when I import it into the app,…
Wapax
  • 37
  • 8
0
votes
1 answer

NestJs - expanding .env variables does not work

I try to port a project to NestJs and have some troubles with environment variables. For now I just have a single .env file in the root of the project. The variables can be retrieved from the ConfigService but they are not expanded. The App…
andymel
  • 4,538
  • 2
  • 23
  • 35
0
votes
0 answers

Attaching DataLoaders to GraphQL context in NestJS

I have the following project setup where GraphQL module options are passed asynchronously using factory function and ConfigService. My objective is to attach DataLoaders to the GraphQL context while following this guide. As stated in the ‘Attaching…
0
votes
1 answer

Unable to import modules in nestjs

I have three modules moviesModule, searchModule and configModule that I am trying to import import { CategoryService } from './../category/category.service'; import { Module } from '@nestjs/common'; import { DatabaseModule } from…
kittu
  • 6,662
  • 21
  • 91
  • 185
0
votes
1 answer

Nest js after do some change, not star succefully

I have a project in nestJs, but I do a simple change that add a console.log('') and not start. For start project I use: yarn start:dev But project stay in: [Nest] 1772 - 23/03/2023, 7:55:13 LOG [InstanceLoader] PassportModule dependencies…
philip Gue
  • 25
  • 4
0
votes
1 answer

NestJS in start:dev mode does not realize that an issue has already been fixed and must be restarted manually

I had an issue with my find() method. @Get(':id') async findOne(@Param('id', ParseIntPipe) id: number) { return await this.repository.findOne(id); } Then I found out that I have to add where condition or replace it with…
r00k13
  • 215
  • 3
  • 15
0
votes
1 answer

NestJs Build option to create single file

I am having to NestJS app on running npm run build one app creates one single file and the other app create as many .js files as I have in in may app I am unable to find the settings where I can say I need one single file. Any NestJS Developer who…
user1592129
  • 461
  • 1
  • 5
  • 16
0
votes
0 answers

How to add Interceptors optionally in NestJS

I am using CacheInterceptor by NestJS for caching requests and responses using Redis. One of the use cases that I have is to toggle caching (disable it completely) based on an environment variable. I am using ConfigModule to read configs from…
Nishkarsh
  • 274
  • 4
  • 16