powersync-js icon indicating copy to clipboard operation
powersync-js copied to clipboard

Powersync electron

Open AnkitAWappgo opened this issue 1 month ago • 1 comments

Hi everyone

I’m setting up the PowerSync Electron example from the PowerSync GitHub repository.

When I run the command: pnpm start

I get the following output:

[email protected] start C:\Users\admin\Desktop\ele-demos\powersync-js\demos\example-electron electron-forge start --inspect-electron

Checking your system Locating application Loading configuration Preparing native dependencies [0.2s] Running generateAssets hook Running preStart hook

The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. ➜ Local: http://localhost:5173/ vite v5.4.19 building for development...

An unhandled rejection has occurred inside Forge: Error: Electron failed to install correctly, please delete node_modules/electron and try installing again at getElectronPath (...)

  1. I have already tried the following but still get the same error:

2)Deleted node_modules and reinstalled (pnpm install)

3)Cleared the pnpm store (pnpm store prune)

4)Removed the global .pnpm-store folder

5)Tried reinstalling Electron manually

6)Verified that other Node and Vite projects work fine

System details:

Windows 10 (x64)

Node.js v22.x

pnpm v9.x

Electron Forge (from PowerSync example)

Running inside demos/example-electron

Has anyone else faced this issue or found a fix for it? Any help or guidance would be appreciated

Thanks! — Ankit

AnkitAWappgo avatar Nov 03 '25 09:11 AnkitAWappgo

Hi, thanks for opening an issue!

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again

I also got this error testing something earlier today, and for me it was enough to specifically delete node_modules/electron in the demos/example-electron-node directory before running pnpm install again.

Another alternative might be to copy sources for that project out of the repository, replacing the workspace dependency for @powersync/node with the latest versio (0.13.0) and running that.

simolus3 avatar Nov 03 '25 16:11 simolus3