Discordjs error when executing index.js

Hi! I'm trying to execute my nodejs file but it throws this error when I try to, I was wondering if anyone knew what could be causing it? Thanks Specs: CentOS 7 djs v14.6.0 nodejs 6.14.17 Full error:
[root@vps-c79e2475 discord]# node index.js
/workspace/discord/node_modules/@discordjs/util/dist/index.js:34
return () => defaultValue ??= cb();
^^^

SyntaxError: Unexpected token '??='
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/workspace/discord/node_modules/@discordjs/rest/dist/index.js:276:19)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
[root@vps-c79e2475 discord]# node index.js
/workspace/discord/node_modules/@discordjs/util/dist/index.js:34
return () => defaultValue ??= cb();
^^^

SyntaxError: Unexpected token '??='
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/workspace/discord/node_modules/@discordjs/rest/dist/index.js:276:19)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
10 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
duck
duck2y ago
discord.js requires a minimum node version of 16.9.0
brokenrecord388
hm, I tried installing 16.9.0 with these commands curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash - yum install -y nodejs but it told me the repo didn't exist, should I be doing it a different way
brokenrecord388
this error when I try to use that second install command
brokenrecord388
I was following this, but changed 10 to 16 https://linuxize.com/post/how-to-install-node-js-on-centos-7
How to Install Node.js and npm on CentOS 7
This tutorial walks you through the steps to install Node.js and npm on a CentOS 7 machine. Node.js is a cross-platform JavaScript run-time environment that allows server-side execution of JavaScript code.
brokenrecord388
I mean that's what I originally thought, but I couldn't find any other guides that didn't say the same thing as linuxizes did oh does it? lemme go look for it real quick oh thanks its relatively the same, I've used the way it tells me to but it's still getting that 14.2 one it had a yum repo clean thing, tried that it's still trying to get that one nothing, it removed itself when it tried to update and won't reinstall because of that error could it be something to do with me originally curl'ing the 14.x version and that for some reason taking priority? idk how curl works if it is, I don't know how to clear it wdym like try to install with a specific version? yum install nodejs_16.x? hm is there a guide for that you recommend I need to run this locally, not on the server right? wait no im stupid I ran the curl command to install it, it said it installed, relaunched terminal, used command -v nvm, no response :' ) why's this so darn difficult idk if its literally the os doing it or some cache thing going on I don't know enough about centos to know how to clear it's caches and completely get rid of everything related to node and literally start again
brokenrecord388
Unix & Linux Stack Exchange
Why is yum trying to install the wrong version of node.js?
On a CentOS 7 server, I am trying to install version 5.x of Node.js, but for some reason, yum keeps trying to install version 0.x and returning an error when it cannot find version 0.x at the 5.x
brokenrecord388
although clean wont clean it!! :DDD?!? would it be worth just rm'ing that or will that break something so does that mean its safe to just delete or fuck it im going for it it put itself straight back there -_-