Ask coding questions

← Back to all posts
Will repl.it add electron.js
h
willuhmjs (7)

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?

Commentshotnewtop
ChezCoder (1484)

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

Coder100 (4394)

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!

StudentFires (341)

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?

Highwayman (1367)

@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.

StudentFires (341)

@Highwayman But I still want Node to be updated.

Highwayman (1367)

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

StudentFires (341)

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

Highwayman (1367)

@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?

Highwayman (1367)

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

StudentFires (341)

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

StudentFires (341)

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

Highwayman (1367)

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

StudentFires (341)

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

Highwayman (1367)

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

StudentFires (341)

@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.

Highwayman (1367)

@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...

StudentFires (341)

@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.

Highwayman (1367)

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

ChezCoder (1484)

@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

Highwayman (1367)

@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

ChezCoder (1484)

@Highwayman no no, didnt mean it like that sorry

Coding1000 (9)

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

blackcarter (19)

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.

Highwayman (1367)

@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

blackcarter (19)

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

Highwayman (1367)

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

Highwayman (1367)

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

Highwayman (1367)

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?

willuhmjs (7)

@Highwayman I think you know what I meant