when you get the error , first check the root pnpm-workspace.yaml to have your packages like:
packages:
then try to add the custom dependency into your each project package.json
"dependencies": { "@Custom-package": "workspace:*", }
and then try to install your project one by one
pnpm install