Wrong Node Version

Hey, I'm trying to install packages but it says discord.js only supports v16, but when I run node -v it says I have V16.
21 Replies
d.js docs
d.js docs3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Jaworek
Jaworek3y ago
update to 16.6+
Almeida
Almeida3y ago
probably a bug with the yarn version you're using have you tried creating another terminal session?
Chelsea
ChelseaOP3y ago
nope, ill try didnt work didnt work any other ideas
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Chelsea
ChelseaOP3y ago
16.6 using replit so not really an option
⸸⛧Stealth⛧⸸
Check your package.json under engines
Chelsea
ChelseaOP3y ago
"devDependencies": {
"node": "16.6"
}
"devDependencies": {
"node": "16.6"
}
⸸⛧Stealth⛧⸸
what that's your devDependency not your engine
Chelsea
ChelseaOP3y ago
just added this:
"engines": {
"node": "16.6.0"
},
"engines": {
"node": "16.6.0"
},
still error
⸸⛧Stealth⛧⸸
Hmmm... remove engines part and make sure to remove any dependencies that has "node" like the one you showed above
Chelsea
ChelseaOP3y ago
done same error
⸸⛧Stealth⛧⸸
How did u install yarn? and what OS are u using
Chelsea
ChelseaOP3y ago
replit
⸸⛧Stealth⛧⸸
Does it work locally?
Chelsea
ChelseaOP3y ago
havent tested gimme a sec b4 i test locally, i think ik what the issue is i used this to update to v16 because replit doesnt come with it already when u make a repl
npm init -y && npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH
npm init -y && npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH
is the issue in this? @mateie
⸸⛧Stealth⛧⸸
yes you're not updating your node to 16 from that line
Chelsea
ChelseaOP3y ago
i see is there a line of code that u can use to update it?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
⸸⛧Stealth⛧⸸
ArtA might be right here try what they suggest
Want results from more Discord servers?
Add your server