Creating this issue as requested by @zkochan on discord.

$ pnpm --version
5.8.0
https://github.com/mtford90/timberwolf/tree/try-pnpm
git clone https://github.com/mtford90/timberwolf.git
cd timberwolf
git checkout try-pnpm
pnpm install
ls node_modules # observe broken symlinks.
There should be no invalid symlinks
Symlinks are pointing to nowhere.
node -v prints: v14.7.0I see, so these are optional dependencies that are skipped. Hoisting still creates the symlinks to them even though they are not installed.
We should fix this probably but I don't think it is a high priority as those packages should not be installed and everything should be functional even with a few broken symlinks inside node_modules.
@zkochan ah, this must be a naughty package then...
if you try pnpm run rebuild:electron it will fail due to missing async-each which indicates these dependencies should not in fact be optional.
We have exactly the same issue with invalid symlinks affecting us in multiple ways.
See for example that bug (which is a bug in azure task I think so I've submitted it there, but still won't occur if pnpm won't create invalid symlink): https://github.com/microsoft/azure-pipelines-tasks/issues/13688
Another similar issue we have with SonarQube which also scans everything and crashes on invalid symlink.
Of course those tools may just not fail when spotting invalid symlink, but they do and here's a simple and centralized solution - don't create them.
:ship: 5.13.7
Most helpful comment
:ship: 5.13.7