postman-code-generators icon indicating copy to clipboard operation
postman-code-generators copied to clipboard

post-install script hangs when using pnpm in a project with * as package descriptor

Open gonzalob opened this issue 1 year ago • 1 comments

When using '*' as package definition for a pnpm workspace, the post-install script hangs until it triggers an OOM. Looks like it's spawning infinite shells to build itself recursively.

To reproduce:

  • clone the sample repository
  • prune your local pnpm store (pnpm store prune)
  • install dependencies using pnpm (pnpm install)

gonzalob avatar Oct 02 '24 08:10 gonzalob

Want to shed some light on this matter, I think this is a pnpm issue.

A work around is to somehow ignore the postinstall script and manually run it. In my case, I have to fork the repo, rename the postinstall script to "postinstall-custom". Then after pnpm install, I will go directly to the postman-code-generators and run pnpm postinstall-custom

My setup:

  • pnpm v9
  • monorepo using turborepo

tripheo0412 avatar Oct 21 '24 18:10 tripheo0412