nodejs / corepack

Zero-runtime-dependency package acting as bridge between Node projects and their package managers
MIT License
2.31k stars 146 forks source link

How to debug `pnpm` inside corepack? #440

Open KSXGitHub opened 3 months ago

KSXGitHub commented 3 months ago

There is a bug that only happens inside corepack. It is reproducible with stable release of pnpm, but I can't debug them. I need to debug the pnpm codebase as if it was running inside corepack. The pnpm codebase provide a special command named pd to help developer.

aduh95 commented 3 months ago

I would create a symbolic link in the COREPACK_HOME that points to your local repo, so something like ln -s /path/to/pnpm/local/clone ~/.cache/node/corepack/pnpm/10.0.0-dev – and then you can run it with corepack pnpm@10.0.0-dev ….