Ask coding questions

← Back to all posts
How can i update node.js?
MrSnowy

i am making a discord bot but for discord.js v13 i need Node.js 16.6.0 or newer, the version of replit is v12.22.1 . How can i update it?

Voters
MrSnowy
Comments
hotnewtop
retronbv

You can do npm i [email protected] then you can run your file via ./node_modules/node/bin/node index.js in the shell window

Highwayman

use a Nix repl instead, and add the node-16_x package to your dependancies likes so:

replit.nix:

This unfortunately only gets you up to 16.4.1, but that's about the closest you can get with Nix.

If I remember correctly, there is an alternate solution, but it includes downloading the newer version of Node.js using npm.