So the pnpm install for v3.4.0.beta3 worked fine, but the latest version of Discourse does not? Very strange!
One thing to bear in mind is that, compared to other package managers, pnpm makes very heavy use of “hard links” on the filesystem. That can cause problems on some filesystem types… although it is supposed to automatically fallback to a non-hardlink-based strategy. More info on that here.
Comparing to a standard install:
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
So, overlay2 is the same. But the backing filesystem is different… I don’t know if that would have any bearing on this kind of problem?