Discordjs for win7?

i am not able to get discordjs work on windows 7 something related guild issues also what version of nodejs is requried for it? also it gives proble with like node:
28 Replies
d.js toolkit
d.js toolkit•3w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
MEGAMIND
MEGAMINDOP•3w ago
im using C:\Users\hp>node -v v23.3.0
Amgelo
Amgelo•3w ago
hmm that should work as well what issues are you having it's most likely unrelated to win7
MEGAMIND
MEGAMINDOP•3w ago
ill share it in few moments taking screenshot now
Amgelo
Amgelo•3w ago
also npm list discord.js
MEGAMIND
MEGAMINDOP•3w ago
```js
> electron .


App threw an error during load
Error: Cannot find module 'node:events'
Require stack:
- F:\fm\main\vcmp-browser-win7\node_modules\discord.js\src\client\BaseClient.js
- F:\fm\main\vcmp-browser-win7\node_modules\discord.js\src\index.js
- F:\fm\main\vcmp-browser-win7\main.js
- F:\fm\main\vcmp-browser-win7\node_modules\electron\dist\resources\default_app.asar\main.js
-
at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
at Module._load (internal/modules/cjs/loader.js:732:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (F:\fm\main\vcmp-browser-win7\node_modules\discord.js\src\client\BaseClient.js:3:22)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
```js
> electron .


App threw an error during load
Error: Cannot find module 'node:events'
Require stack:
- F:\fm\main\vcmp-browser-win7\node_modules\discord.js\src\client\BaseClient.js
- F:\fm\main\vcmp-browser-win7\node_modules\discord.js\src\index.js
- F:\fm\main\vcmp-browser-win7\main.js
- F:\fm\main\vcmp-browser-win7\node_modules\electron\dist\resources\default_app.asar\main.js
-
at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
at Module._load (internal/modules/cjs/loader.js:732:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (F:\fm\main\vcmp-browser-win7\node_modules\discord.js\src\client\BaseClient.js:3:22)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
[email protected] F:\fm\main\vcmp-browser-win7 `-- [email protected] alot of problems with node: node:events then node:something else and on and on
Amgelo
Amgelo•3w ago
you're running an electron app
MEGAMIND
MEGAMINDOP•3w ago
yes i am actually let me clear u with latest version of discord npm and electron it works fine but on lower version of electron thats compatible to win 7 on that discord doesnt work i mean discordjs
Amgelo
Amgelo•3w ago
could you console.log(process.version) inside the electron app before doing anything
MEGAMIND
MEGAMINDOP•3w ago
i can tell u from apckagejson "electron": "^13.6.9",
Amgelo
Amgelo•3w ago
that's not what I'm looking for
MEGAMIND
MEGAMINDOP•3w ago
oh oki wait pls
Amgelo
Amgelo•3w ago
not sure how electron apps work, but this is how you log node's version in a node app
MEGAMIND
MEGAMINDOP•3w ago
ill try the console method for seniding and recing messages for a vcmp game discordjs being used as proxy complex stuff.. have already achieved it using latest version of everything just getting issues for win 7
Amgelo
Amgelo•3w ago
pretty sure it's just the electron version though have you tried with that version but on modern windows
MEGAMIND
MEGAMINDOP•3w ago
yes on modern version of window lets say i have win 11 atm and it works but while compiling app for win7 it doesnt work
Amgelo
Amgelo•3w ago
maybe it ships with a different node version?
MEGAMIND
MEGAMINDOP•3w ago
hmm no idea
Amgelo
Amgelo•3w ago
importing node apis using the node: namespace was only supported since v16 iirc
MEGAMIND
MEGAMINDOP•3w ago
F:\fm\main\vcmp-browser-win7>node -v v23.3.0 F:\fm\main\vcmp-browser-win7>npm -v 11.0.0 what do i need to update? oki ill do that v14.16.0 what do i do to update?
Amgelo
Amgelo•3w ago
you'll probably have better luck in an electron support community for an answer to that
MEGAMIND
MEGAMINDOP•3w ago
i see thankyou im using 11 but my customer is on 7 so yea its hard to make them understand for 11 is fine for 7 not working 😦
Amgelo
Amgelo•3w ago
running a bot in an electron app is kind of rare as well, but I think it should work, if you had the right node version normally it makes much more sense to run it in an actual server
MEGAMIND
MEGAMINDOP•3w ago
running it in electronjs works fine on latest version of windows, electronjs and nodejs but issues are in win7 😛
Amgelo
Amgelo•3w ago
you said you had to change the electron version to support windows 7 though, are you sure it's 100% windows 7 and not just the old electron shipping an old node version
MEGAMIND
MEGAMINDOP•3w ago
let me tell u i downgraded my electron app to the version where it supported win7 works fine for all other stuff but idk what version will it work with discordjs lower version
Amgelo
Amgelo•3w ago
you need at least node 18 for djs to work iirc that specific part is breaking because it's using node 16+ imports, and you're on 14

Did you find this page helpful?