Giter VIP home page Giter VIP logo

Comments (5)

njpearman avatar njpearman commented on July 19, 2024

I've just tried adding nestjs-opentelemetry to our application and I'm getting a similar / the same error. Nest doesn't seem to know how to inject ModulesContainer for any of the auto injectors. I've tried setting a specific traceAutoInjectors of [PipeInjector], and with default of all injectors.

Using:

from nestjs-opentelemetry.

khoalda avatar khoalda commented on July 19, 2024

I've just tried adding nestjs-opentelemetry to our application and I'm getting a similar / the same error. Nest doesn't seem to know how to inject ModulesContainer for any of the auto injectors. I've tried setting a specific traceAutoInjectors of [PipeInjector], and with default of all injectors.

Using:

I solved it by upgrading my NestJS version to 9

from nestjs-opentelemetry.

njpearman avatar njpearman commented on July 19, 2024

I tried with NestJS version 9 + nestjs-opentelemetry v3.0.0 but still experienced the same error. Maybe my node_modules/ were in a mess though. I'll try again.

from nestjs-opentelemetry.

thefuga avatar thefuga commented on July 19, 2024

I'm having the same issue after upgrading to NestJS 10. Any updates on this? Thank you!

from nestjs-opentelemetry.

nicolasgarnil avatar nicolasgarnil commented on July 19, 2024

Same problem with NestJS 10 as well. I tried removing ControllerInjector and still getting a similar error:

    OpenTelemetryModule.forRoot({
      traceAutoInjectors: [],
      serviceName: 'my-service',
    }),
[Nest] 27056  - 01/24/2024, 3:26:12 PM   ERROR [ExceptionHandler] Nest can't resolve dependencies of the DecoratorInjector (?). Please make sure that the argument ModulesContainer at index [0] is available in the OpenTelemetryModule context.

Potential solutions:
- Is OpenTelemetryModule a valid NestJS module?
- If ModulesContainer is a provider, is it part of the current OpenTelemetryModule?
- If ModulesContainer is exported from a separate @Module, is that module imported within OpenTelemetryModule?
  @Module({
    imports: [ /* the Module containing ModulesContainer */ ]
  })

Error: Nest can't resolve dependencies of the DecoratorInjector (?). Please make sure that the argument ModulesContainer at index [0] is available in the OpenTelemetryModule context.

Potential solutions:
- Is OpenTelemetryModule a valid NestJS module?
- If ModulesContainer is a provider, is it part of the current OpenTelemetryModule?
- If ModulesContainer is exported from a separate @Module, is that module imported within OpenTelemetryModule?
  @Module({
    imports: [ /* the Module containing ModulesContainer */ ]
  })

from nestjs-opentelemetry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.