Skip to content
Sign upLog in
← Back to Community

Will repl.it add electron.js

Profile icon
[deleted]

Repl.it has other nodejs "frameworks" such as express, and I want to build an app in electronjs, which repl consider adding this in the near future?

Voters
Profile icon
OrsaJavadian
Profile icon
RedstoneRadiant
Profile icon
Grify
Profile icon
xxpertHacker
Profile icon
RaldyDaldy
Profile icon
blackcarter
Profile icon
Highwayman
Comments
hotnewtop
Profile icon
HackermonDev

Probably not.

Profile icon
DeathlokGamingG

It Works Now With Nix. It is very easy. Electron Fails to work due to missing files that are available as root. Now you can use it. Just type "fakeroot" in your terminal and select fakeroot.out and hit enter.
If it fails add pkgs.fakeroot to replit.nix.
Now start your app by "electron . --no-sandbox" If it fails then follow the error info or do "electron ." Then follow error info.
Please Like my comment.

Profile icon
blaster202

Yes! This is possible. But I think you need to make it a bash repl and setup the nodejs project yourself. (npm init)

Someone else made this: https://repl.it/@RowanFromBJC/happy-electron-app#main.sh

and this: https://repl.it/talk/ask/Electron-on-replit/28788
Even the dev tools work.

I'm not sure if a normal NodeJS repl will work though.

Profile icon
ChezCoder

Probably not. Repl.it is bullying people who code in nodejs. Apparently, the nodejs in repl is still in version 10. You can go check for yourself. Go to a node.js console in repl and type

process.version

smh repl

Profile icon
Coder100

Electron.js cannot be currently added.
I have tried it and apparently electron fails to install. Even if it does work, I doubt that repl.it will make a display screen show up.

Solution:
Use a bash (terminal) REPL

  1. The code should be
npm init -y npm install --save-dev electron # Add other packages here
  1. Create index.js file (if all that stuff above works ^^)
// your electron code const { ... } = require("electron"); ...

Good luck!

Profile icon
xxpertHacker

Pff, they won't even update NodeJS or TypeScript... and you think they'll do this!?
Also, if it's like Express just get it through NPM and use require(...), what's so special about it?

Profile icon
Highwayman

@StudentFires
sadly it’s not like express, it is about as far as you can get from express :((((( It’s more like node.js itself.

Profile icon
xxpertHacker

@Highwayman
So I've heard.

Profile icon
xxpertHacker

@Highwayman
But I still want Node to be updated.

Profile icon
Highwayman

@StudentFires
👌 put it in feedback? Oo put it in bugs XD

Profile icon
Highwayman
Profile icon
xxpertHacker

@Highwayman
They don't care, they've been bugged by others for some time now without success.

Profile icon
Highwayman

@StudentFires
🤷‍♂️ Then I guess it’ll never happen, though I just ask: why do you want it updated anyways? Some big feature is missing or something?

Profile icon
xxpertHacker

@Highwayman
Yup, copy this or this to NodeJS.

Profile icon
Highwayman

@StudentFires
if it’s so easy to code, then why do you need the entirety of node to be updated? Seems kinda excessive ngl.

Profile icon
xxpertHacker

@Highwayman
That's just a separate file I'm posting to ASK rn, the actual body is far larger.

Profile icon
Highwayman

@StudentFires
oh. I was like tf

Profile icon
xxpertHacker

@Highwayman
lol, I wouldn't require an entire update of Node, for a single section of code like that.

Profile icon
Highwayman
Profile icon
Highwayman

@StudentFires
why don’t you just compile some typescript to js and then run node on that?

Profile icon
xxpertHacker

@Highwayman
It doesn't truly allow types, it can still happen.

Profile icon
Highwayman

@StudentFires
ok.. why is this important? (Real question, just curious)

Profile icon
xxpertHacker

@Highwayman
Sorry, hadn't been on Repl since I last commented. It's because I come from C++, which is strictly typed (excluding auto). I was gonna emulate C++ types, such as strings using character arrays. Character arrays are easier to work with as we can just change the character that we want to modify, and seeing as one of your favorite languages on Repl is C++, you should understand.

Also, there's other things that Node doesn't support, like RegExp.matchAll.

Profile icon
Highwayman

@StudentFires
eh. I love C++, but I also love js, and for entirely different reasons. To try and make one become the other doesn’t make much sense to me unless there are performance advantages or something. How are character arrays easier to work with in C++? Wait, can you not access individual characters in js? Hm. Never noticed that before...

Profile icon
xxpertHacker

@Highwayman
Lol, JS has multicharacter constants, not std::string(s), but it's to emulate the experience, just to see if it's possible. And yeah, I like both too.

Profile icon
Highwayman

@StudentFires
oh 😬 lol I need to pay more attention to that kinda stuff I didn’t even notice all this time!! XD

Profile icon
slip1244

@StudentFires
node's being updated soon

Profile icon
xxpertHacker

@nithilan4
What make you say this?

Profile icon
ChezCoder

@highwayman
, heres the problem. Its quite humorous actually,
Discord.js is in version 12 while node is in version 10.
problem is, discord.js 12 uses features from nodejs 12 and some features are exclusive to ^nodejs 12. So some functions wont work even if they do because they require a different version of node. The bot is called disco actually.

STARES INTENSELY AT HIGHWAYMAN

Profile icon
Highwayman

@ChezCoder
I’m really sorry man, I can’t rn, I got some really big hw that MUST be done today so I had to get off repl.it to do it. Also why you gotta expose me like that XD

Profile icon
ChezCoder

@Highwayman
no no, didnt mean it like that sorry

Profile icon
Coding1000

Not Quite sure, because the Repl.IT server is already filled up with languages and other programs, and Electron is more than just a framework like what

@Highwayman
stated but this npm is more of a desktop app and It can probably expose IP Addresses and other personal content and you need a version control, and besides this is a humongous thing to do in the server and complicated

Profile icon
blackcarter

Electron has access to computer API stuff, I don't see why using a PC application on a website on a PC would make sense.

Profile icon
Highwayman

@blackcarter
.... so does every other thing on this site. It’s a vm. It’s supposed to be able to support stuff like that. Really the only thing that is stopping electron from working is that you need the chromesandbox- OH!!! OH OH OH I THINK I CAN MAKE THIS WORK!! O.O. Ooohhh my goshhh. Ok brb

Profile icon
blackcarter

@Highwayman
I mean, you do you I just don't see the usecase

Profile icon
Highwayman

@blackcarter
your staring it in the fac my friend lol. Repl.it and everything on it.

Profile icon
Highwayman

@Highwayman
aw, I failed to make it work :(

Profile icon
Highwayman

Isn’t electron.js a lot more than just a framework? Wouldn’t you say it’s more on par with, say, node.js itself?

Profile icon
[deleted]

@Highwayman
I think you know what I meant