link-workspace-packages

Link sibling workspace packages using native npm, yarn, pnpm, or bun syntax.

7|2|Updated Jan 12, 2024
One-click install
npx skills add https://github.com/wghglory/ngx-lift-workspace --skill link-workspace-packages-wghglory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/wghglory/ngx-lift-workspace/tree/main/.opencode/skills/link-workspace-packages
Command: npx skills add https://github.com/wghglory/ngx-lift-workspace --skill link-workspace-packages-wghglory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill fixes broken workspace package resolution in monorepos by creating the real dependency links that sibling packages need, instead of relying on brittle path aliases or manual edits.

Core Features & Use Cases

  • Workspace-aware linking: Adds sibling packages using the package manager's native workspace syntax so imports resolve correctly.
  • Multi-manager support: Handles pnpm, yarn, npm, and bun workflows with the right command for each ecosystem.
  • Common scenarios: Useful after generating new packages, when a consumer package imports from a sibling package, or when build and TypeScript errors such as cannot find module and TS2307 appear.

Quick Start

Ask me to link the sibling workspace package your app imports so the dependency is declared with the correct package manager command and the local symlink is created.

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 TS2307 cannot find module errors for sibling packages in a monorepo?

Fix TS2307 cannot find module errors in a monorepo by linking workspace packages with native dependency declarations instead of tsconfig path aliases. This adds the correct local symlink so sibling package imports resolve properly during TypeScript builds.

How do I link a new package to an existing workspace using pnpm or yarn?

Link a new package to an existing workspace using pnpm or yarn by adding the sibling package via your package manager's native workspace syntax. This creates the correct local symlink and declares the dependency automatically without manual package.json edits.

What is the best way to resolve missing imports for local packages in a monorepo?

The best way to resolve missing imports for local packages in a monorepo is using native workspace-aware linking rather than manual package.json edits. This establishes real symlinks and correct dependency declarations for sibling packages across npm, yarn, pnpm, and bun.

Does this workspace linking approach work with both pnpm and bun workflows?

Yes, this workspace linking approach works with pnpm and bun workflows, alongside npm and yarn. It applies each package manager's native workspace syntax to create correct local symlinks and dependency declarations for sibling packages.

Why should I use native workspace syntax instead of tsconfig path aliases for monorepo dependencies?

Use native workspace syntax instead of tsconfig path aliases because path aliases are brittle and do not create actual symlinks. Native workspace linking adds real dependency declarations that satisfy module resolution across your entire monorepo build pipeline.

What causes broken workspace package resolution after generating new packages in a monorepo?

Broken workspace package resolution occurs after generating new packages because the sibling packages lack proper local dependency declarations and symlinks. Linking them with your package manager's native workspace syntax fixes these missing imports and module resolution failures.