link-workspace-packages

Link workspace packages in monorepos using npm, yarn, pnpm, or bun.

Updated Dec 29, 2025
One-click install
npx skills add https://github.com/miordache93/evoklas --skill link-workspace-packages-miordache93
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/miordache93/evoklas/tree/main/.cursor/skills/link-workspace-packages
Command: npx skills add https://github.com/miordache93/evoklas --skill link-workspace-packages-miordache93

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 workspace packages.

Core Features & Use Cases

  • Package Linking: Correctly adds sibling packages as dependencies in monorepos.
  • Dependency Resolution: Fixes errors like "cannot find module" or "TS2307" for workspace packages.
  • Use Case: After creating a new UI component library and a new application package in your monorepo, use this Skill to link the UI library to the application, ensuring the application can import components from it.

Quick Start

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

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 for workspace packages in a monorepo?

To fix "cannot find module" errors for workspace packages, you need to correctly link the sibling packages as dependencies. This ensures proper dependency wiring and resolves module resolution failures across your monorepo.

How do I link a local UI component library to an application in a monorepo?

You link a local UI component library to an application by identifying the consumer and provider packages, then utilizing your package manager's specific workspace commands to add the sibling package as a dependency.

Does this workspace linking approach work with both pnpm and yarn?

Yes, this workspace linking approach works with pnpm and yarn, alongside npm and bun. It supports various package managers to ensure correct dependency wiring across different monorepo setups.

What is the best way to add sibling packages as dependencies in a monorepo?

The best way to add sibling packages as dependencies in a monorepo is to use your specific package manager's workspace linking commands. This correctly wires the consumer and provider packages together to prevent resolution errors.

Why am I getting TS2307 errors when importing from a workspace package?

You get TS2307 errors when importing from a workspace package because the dependency is not correctly wired. Linking the workspace packages properly resolves these dependency issues by adding the sibling package correctly.

Do I need to manually configure dependencies when linking packages with bun?

No, you do not need to manually configure dependencies when linking packages with bun. The process utilizes bun's specific workspace commands to add dependencies and ensure correct resolution automatically.