Unable To Create A Electron App

Hi,

When I try create a Electron app I get the following error. Is this a Wappler bug or am I doing something wrong? I am trying to do this on a Mac.

Thanks,

I managed to get past this error by updating Electron in Wappler.

I am now getting this error though. Do I need to install typescript for Electron to work?

Thanks,

Yes, typescript is needed. I don't recall needing to install it manually though.

Have you run the system check and install node packages?
image

image

If it's still not getting installed you could run the command yourself in terminal.
npm install -g typescript

Thanks @kfawcett

Tried the system check and install node packages. Screenshot is above it seems fine.

When I tried to run npm install -g typescript it did moan I didn't have enough priveleges so ran with sudo.

I'm now getting all these errors. Have you seen these before?

Thanks,

Are you on Mac? I had a ton of issues getting it set up on Mac.

I would suggest using ChatGPT 4o or o1 and working with it to resolve the issues by feeding it your errors.

Thanks, Yeah it’s a Mac. I’ll have a go with ChatGPT. I do have a windows laptop so I fail I’ll try on that.

Can I just ask do you know if you can use the filesystem plugin on an electron app? I see you said the write file doesn’t seem to work.

Thanks

Try to run those commands under the electron folder..
Go to the terminal, hit cd ../ then cd electron, and after that try to build..

Getting abit further :slight_smile: ChatGPT advised me to run

npm install electron electron-rebuild electron-unhandled electron-updater chokidar electron-serve electron-window-state --save

These did install but it advised these were no longer supported.

It now gets a bit further I get this error.

@franse which commands should I run?

Thanks,

@jmartland22

  1. BACKUP, ALWAYS
  2. Go to the terminal and run: npx cap update electron
  3. After that: npx cap sync electron
  4. Under the electron folder on terminal, run: npm install
  5. Take the advice of @George and add "skipLibCheck":true on tsconfig.json

I have made a test recently and all errors dissapears

Thanks, I am still getting errors unfortunately.

Could I ask what version of Node you are using and if you are on a MAC?

Thanks,

Node v22.13.1
Using windows

Thanks @franse :slight_smile:

I might try get it working on a windows laptop.

@kfawcett can I ask what versions of node you have on your mac?

Thanks

I'm not by that machine now, but I believe it's 18. I had to downgrade the version in homebrew I think because I'm using better-sqlite3-multiple-ciphers

Thanks for coming back to me.

I have just managed to get it working. I was running my projects in user/username/wapplerprojects . I did this to stop iCloud picking up and creating duplicate files.

I moved the project into Documents and it still didn't work but I get different errors. I then followed the instructions below of the "skipLibCheck".

Once I did this it works. It must be some sort of permissions issue not sure though but it's working :slight_smile: