link-workspace-packages

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

Updated May 21, 2025
One-click install
npx skills add https://github.com/stixx200/fotobox-v2 --skill link-workspace-packages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/stixx200/fotobox-v2/tree/main/.github/skills/link-workspace-packages
Command: npx skills add https://github.com/stixx200/fotobox-v2 --skill link-workspace-packages

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies dependency management within monorepos by automatically linking local packages, resolving common module resolution errors and ensuring your project's internal dependencies are correctly wired.

Core Features & Use Cases

  • Automated Linking: Connects sibling packages in monorepos using the appropriate package manager commands (npm, yarn, pnpm, bun).
  • Dependency Resolution: Fixes "cannot find module" and similar TS/import errors caused by unlinked workspace packages.
  • Use Case: After creating a new UI component library (@org/ui) and a web application (@org/app) in your monorepo, use this Skill to link @org/ui as a dependency to @org/app, ensuring the app can import components from the new library.

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 when importing local packages in a monorepo?

Monorepo module resolution errors like 'cannot find module' or 'TS2307' occur when workspace packages are not properly linked. This Skill resolves them by using package manager-specific workspace commands to ensure correct symlinking of internal dependencies across your project.

How do I link workspace packages in a monorepo using pnpm or yarn?

You can link workspace packages in a monorepo by executing the appropriate workspace commands for your specific package manager. This Skill automates the linking process across npm, yarn, pnpm, and bun to correctly wire internal dependencies like a UI library to a web app.

Does this workspace linking approach support both npm and bun package managers?

Yes, this workspace linking approach supports multiple package managers including npm, yarn, pnpm, and bun. It utilizes package manager-specific workspace commands to accurately declare and symlink internal dependencies within your monorepo setup.

What is the best way to connect sibling packages in a monorepo?

The best way to connect sibling packages is by using automated workspace linking commands tailored to your package manager. This ensures accurate dependency declaration and symlinking, preventing module resolution failures when importing local libraries across your monorepo.

Why does TypeScript throw TS2307 when importing a newly created monorepo package?

TypeScript throws the TS2307 error when a newly created local package has not been symlinked as a dependency to the importing package. This Skill fixes the error by automatically linking the workspace packages using the correct package manager commands.