link-workspace-packages

Links workspace packages across npm, yarn, pnpm, and bun monorepos.

1|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/vreddi/overnight-mountain --skill link-workspace-packages-vreddi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/vreddi/overnight-mountain/tree/main/.cursor/skills/link-workspace-packages
Command: npx skills add https://github.com/vreddi/overnight-mountain --skill link-workspace-packages-vreddi

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 and ensuring your workspace packages can find and import each other correctly.

Core Features & Use Cases

  • Cross-package dependency management: Automatically adds dependencies between sibling packages in a monorepo.
  • Resolves import errors: Fixes issues like "cannot find module" or "TS2307" that arise from unlinked workspace packages.
  • Supports multiple package managers: Works with npm, yarn, pnpm, and bun.
  • Use Case: After creating a new UI component package and a new application package that needs to use it, this skill will ensure the application correctly references and imports the UI package.

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 a sibling package in a monorepo?

To fix 'cannot find module' errors in a monorepo, you need to link workspace packages using your package manager's workspace commands to establish correct symlinks in node_modules. This ensures sibling packages can correctly resolve and import each other.

Does linking workspace packages work with both pnpm and yarn?

Yes, linking workspace packages works seamlessly with pnpm and yarn, as well as npm and bun. It uses each package manager's native workspace commands to establish correct symlinks and resolve cross-package dependencies.

What's the best way to add a local UI package as a dependency to my monorepo application?

The best way to add a local UI package as a dependency to a monorepo application is to use your package manager's workspace linking commands. This automatically establishes the correct cross-package dependency reference and resolves import errors.

Why does TypeScript throw TS2307 for workspace packages that exist in my monorepo?

TypeScript throws TS2307 for existing workspace packages because they are unlinked in node_modules. You must run your package manager's workspace commands to create symlinks, which resolves the module path and clears the error.

When do I need to manually link packages in a monorepo?

You need to link packages in a monorepo when you create a new sibling package and another package needs to import it. Linking establishes the necessary node_modules symlinks so the importing package can correctly resolve the dependency.