nestjs-expert

Diagnose Nest.js dependency resolution and circular dependency errors.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/stephanofer/facets-api --skill nestjs-expert-stephanofer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-expert
Source: https://github.com/stephanofer/facets-api/tree/main/.opencode/skills/nestjs-expert
Command: npx skills add https://github.com/stephanofer/facets-api --skill nestjs-expert-stephanofer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers overcome complex challenges in Nest.js applications, from architectural design and dependency injection issues to debugging intricate runtime problems and optimizing performance.

Core Features & Use Cases

  • Architecture & DI: Guides on module design, provider scope, and resolving circular dependencies.
  • Request Lifecycle: Expertise in middleware, guards, interceptors, and pipes.
  • Testing & Debugging: Strategies for Jest/Supertest, debugging common errors like "can't resolve dependencies."
  • Integration: Advice on Prisma ORM and Passport.js authentication.
  • Use Case: You're encountering a "Nest can't resolve dependencies of the UserService" error. This Skill will guide you through checking module providers, exports, and potential typos.

Quick Start

Use the nestjs-expert skill to help debug a circular dependency issue in my Nest.js application.

Frequently Asked Questions about nestjs-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix the "Nest can't resolve dependencies" error in my Nest.js application?

To fix Nest.js dependency resolution errors, verify that all required providers are correctly registered and exported in your module definitions. This Skill helps identify missing module exports, provider scope misconfigurations, and injection token typos causing the UserService or similar services to fail at runtime.

How do I resolve circular dependencies in Nest.js modules?

Resolving circular dependencies in Nest.js requires using forwardRef() and specific injection techniques to break the cycle. This Skill provides expert guidance on refactoring module architecture and applying forward references to successfully manage circular imports between tightly coupled modules.

How does the Nest.js request lifecycle work with middleware, guards, interceptors, and pipes?

The Nest.js request lifecycle executes components in a specific sequence: middleware, guards, interceptors, pipes, and finally the controller handler. This Skill explains the architectural execution order and helps you strategically place business logic across these layers for optimal request processing.

How do I set up testing modules with Jest and Supertest in Nest.js?

Setting up Nest.js testing modules with Jest and Supertest involves configuring the Test module builder to provide mocked dependencies and compile the application context. This Skill details strategies for initializing testing modules, mocking providers, and writing robust end-to-end test suites.

Can I integrate Prisma ORM and Passport.js authentication into a Nest.js backend?

Yes, you can integrate Prisma ORM and Passport.js authentication into a Nest.js backend by configuring them as custom providers and modules. This Skill offers architectural advice on combining Prisma data access with Passport.js authentication strategies within your dependency injection system.

What is the best way to debug Nest.js runtime errors and dependency injection failures?

The best way to debug Nest.js runtime errors is to analyze the dependency injection container and trace provider scoping issues within your module architecture. This Skill assists in identifying architectural flaws, resolving complex runtime exceptions, and optimizing overall framework performance.