How run electron.js with bun?

889 views Asked by At

I recently switched my OS to Ubuntu and installed bun instead of Node.js. When I tried to use electron-forge, it said it needed NPM. I tried mapping NPM to bun but it didn't work. What exactly should I do to get electron-forge working with bun on Ubuntu?

I have also tried using electron, but that also had some issues. Can someone please provide me with some specific instructions on how to get electron-forge or electron working with bun on Ubuntu?

Additional information:

Ubuntu version: bun version: 1.0.3 electron-forge version (if applicable): 6.4.2 electron version (if applicable): 27.0.0 Errors or output from electron-forge or electron (if applicable):

$ electron-forge start
⚠ Checking your system
  ✔ Found [email protected]
  ✔ Found [email protected]
  ✖ Incompatible version of NPM detected "1.0.3", must be in range ^3.0.0 || ^4.0.0 || ~5.1.0 || ~5.2.0 || >= 5.4…

It looks like you are missing some dependencies you need to get Electron running.
Make sure you have git installed and Node.js version >= 14.17.5
error: script "start" exited with code 1 (SIGHUP) 

NOTE: i mapped npm to bun

1

There are 1 answers

1
tyjust31 On

in fact w need an envoronnemen like electron for node js but for bun otherwise there is no alternative even tauri doesn't work