Fooling around with the contents of my AppData/Local/pnpm folder I've found a possible fix: renaming the file 'pnpm' (with no extension) has helped. I am not sure this is a proper fix though since it might have broken something else.