repo-package-references

Configure monorepo package references with workspace dependencies, Nx, and TypeScript path aliases.

Updated Jan 1, 2026
One-click install
npx skills add https://github.com/ViewableGravy/better-ecs --skill repo-package-references
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repo-package-references
Source: https://github.com/ViewableGravy/better-ecs/tree/main/.github/skills/repo-package-references
Command: npx skills add https://github.com/ViewableGravy/better-ecs --skill repo-package-references

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the complexity of managing inter-package dependencies within a monorepo, preventing common module resolution errors and ensuring consistency across your workspace.

Core Features & Use Cases

  • Monorepo Dependency Management: Correctly configures @repo/... imports between workspace packages.
  • Error Resolution: Fixes module resolution errors like TS2307 and Vite resolution failures.
  • Use Case: When a new package is added or moved within the monorepo, this skill ensures it can be correctly imported by other packages using the @repo/... alias, synchronizing package.json, tsconfig.base.json, and Nx references.

Quick Start

Use the repo-package-references skill to add a workspace dependency from @repo/provider to the client app.

Frequently Asked Questions about repo-package-references

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

FAQPage Schema
How do I fix module resolution errors like TS2307 for @repo imports in a TypeScript monorepo?

Module resolution errors like TS2307 occur when TypeScript path aliases in `tsconfig.base.json` are not synchronized with workspace package references. Correctly configuring these mappings ensures inter-package imports resolve successfully across the monorepo.

How do I configure Vite to resolve TypeScript path aliases for monorepo workspace packages?

Vite fails to resolve monorepo workspace packages when TS path mappings are missing from the Vite configuration. Synchronizing `tsconfig.base.json` path aliases with Vite's TypeScript resolution settings fixes inter-package import failures.

What is the best way to add a workspace dependency from one package to another in an Nx monorepo?

Adding a workspace dependency requires updating `package.json` references and synchronizing Nx project configurations alongside `tsconfig.base.json` path mappings. This ensures the imported package is correctly recognized within the Nx workspace structure.

Why does my Vite build fail to resolve inter-package imports after moving a package within my monorepo?

Vite resolution failures happen when moving a package breaks existing TypeScript path aliases and workspace dependency references. Re-synchronizing the `@repo/...` imports across `package.json`, Nx, and Vite configurations restores correct module resolution.

Do I need Nx project references to use @repo scoped package aliases in a TypeScript monorepo?

Nx project references are required to correctly map inter-package dependencies when using `@repo/...` scoped aliases. Configuring Nx alongside `tsconfig.base.json` and `package.json` ensures consistent module resolution across the workspace.