pnpm run dev
When I ran it like this using pnpm, I got the following error:
Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
Running the following code fixed it:
node node_modules/electron/install.js
My guess is that pnpm's install step is skipping some post-install script that's supposed to run automatically. Since running it manually always works, that seems to be what fixed it.
