Install all project package in a single folder for several use

I want to install multiple package.json in a single folder somewhere else, not in the project folder itself

And if there are duplicate projects, don’t install them

I tried to use pnpm but I don’t know how to do this, please help me

How do I do this?