DEV Community

Krzysztof Żuraw
Krzysztof Żuraw

Posted on • Originally published at krzysztofzuraw.com on

How to link a local npm dependency with pnpm

I have learned how to correctly link a local npm dependency when using pnpm. Here is the process:

  1. Execute pnpm install ./your-library.tgz.
  2. Include the following code in your package.json file:
{
  "pnpm": {
    "overrides": {
      "your-library": "file:./your-library.version.tgz"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Your dependency should now be properly linked!

Top comments (0)