link-workspace-packages

Link workspace packages in monorepos using native commands for npm, yarn, pnpm, and bun.

9|Updated Dec 12, 2023
One-click install
npx skills add https://github.com/Digital-Defiance/BrightChain --skill link-workspace-packages-digital-defiance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/Digital-Defiance/BrightChain/tree/main/.gemini/skills/link-workspace-packages
Command: npx skills add https://github.com/Digital-Defiance/BrightChain --skill link-workspace-packages-digital-defiance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of linking packages within a monorepo, resolving dependency issues that arise from creating or modifying sibling packages.

Core Features & Use Cases

  • Cross-Package Dependency Management: Effortlessly link packages in monorepos using npm, yarn, pnpm, or bun.
  • Resolves Import Errors: Fixes common errors like "cannot find module" or "failed to resolve import" for workspace packages.
  • Use Case: After creating a new UI component package and a dashboard package that needs to use it, this Skill will ensure the dashboard can correctly import and use the UI components without manual configuration.

Quick Start

Use the link-workspace-packages skill to add the '@org/ui' package as a dependency to the '@org/app' package.

Frequently Asked Questions about link-workspace-packages

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

FAQPage Schema
How do I fix 'cannot find module' errors when importing sibling packages in a monorepo?

To fix 'cannot find module' errors when importing sibling packages in a monorepo, you need to properly link workspace packages using native dependency commands to create symlinks and ensure correct dependency declaration.

Does this approach work for linking workspace packages across different package managers like npm, yarn, pnpm, and bun?

Yes, linking workspace packages works seamlessly across npm, yarn, pnpm, and bun by leveraging each package manager's native workspace linking commands to establish correct symlinks for inter-package communication.

What is the best way to link a new UI component package to a dashboard application within a monorepo?

The best way to link a new UI component package to a dashboard application within a monorepo is to automate workspace package linking, ensuring the dashboard can correctly import and use the UI components without manual configuration.

Why does my monorepo fail to resolve imports after adding a new sibling package?

Your monorepo fails to resolve imports after adding a new sibling package because the workspace dependencies are not properly linked, preventing the package manager from creating the necessary symlinks for inter-package communication.

How to resolve dependency issues when creating or modifying packages in a monorepo?

To resolve dependency issues when creating or modifying packages in a monorepo, automate the process of linking workspace packages to ensure correct dependency declaration and symlink creation for sibling package imports.

Do I need to manually configure symlinks for inter-package communication in a monorepo?

No, you do not need to manually configure symlinks for inter-package communication in a monorepo because native workspace linking commands handle dependency declaration and symlink creation automatically across npm, yarn, pnpm, and bun.