coiai Logo

This article is an English translation of the original Japanese post. Read the Japanese original →

Electron Won't Start When Using pnpm

July 11, 2025

Categories: 未分類

Electron Won't Start When Using pnpm
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.

Reference

https://github.com/electron/electron/issues/20731

Electron Won't Start When Using pnpm | coiai Inc.