question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Global Options Not Working in Nrwl

See original GitHub issue

Global options defined in main.ts of a brand new NestJS project (inside Nrwl NX) don’t seem to be taking affect. Perhaps this is because of Nrwl NX somehow?

My nestjs main.ts file looks like so

// NestJSX Global Crud Config must be BEFORE you import AppModule
import { CrudConfigService } from '@nestjsx/crud';
CrudConfigService.load({
  query: {
    limit: 2,
  },
});

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app/app.module';
import { config } from './config';
import { FusionAuthGuard } from '@sun/auth/nest/guards/fusionauth.guard';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';


async function bootstrap() {
  // Create our nest application
  const app = await NestFactory.create(AppModule);
  etc...

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
lulacommented, Feb 6, 2020

I’m having the same issue as well.

1reaction
eranshmilcommented, Oct 17, 2019

I’m having the same issue, it seems that the decorators are running before the load happens. @mreschke Did you find a way to solve this?

Edit: I moved the load to my CoreModule thats being imported to the AppModule.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nx: Smart, Fast and Extensible Build System
Nothing is faster than not running a task. Nx analyzes your project graph and can diff it against a baseline to determine which...
Read more >
Setup a Monorepo with PNPM workspaces and speed it up ...
In this article we're going to have a deep dive into setting up a new monorepo using PNPM workspaces that hosts a Remix...
Read more >
@nrwl/cli - npm
Start using @nrwl/cli in your project by running `npm i @nrwl/cli`. There are 19 other projects in the npm registry using @nrwl/cli.
Read more >
Getting Started with Monorepo with Nx Nrwl - Rupesh Tiwari
The potential solution to this problem is Monorepo. ... Creating empty Nx Monorepo workspace is our final option for this example.
Read more >
Why am i getting error on using any `nx` commands
Just had this issue myself. Fixed it by deleting all my node_modules, verifying npm cache, updating my global @nrwl-cli, and reinstalling.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found