Ask coding questions

← Back to all posts
Nodejs Update

Guys, I want to know how to update nodejs to the last version because I am working on a discord bot and I want to use the new reply feature so please help me :)


Copy paste from piero#0001 from the Replit Discord

Hey everyone, You are probably aware that Discord.js v13 requires Node.js 16.6.0 and higher, but the highest on our installation of Nix is currently 16.4.1 and the highest on Nix unstable being 16.5.0. The reasoning for this isn't Replit's or Nix's fault, but partially Apple's fault and Node's fault. You see, the MacOS X SDK doesn't come with the signpost.h header, which Nix requires for a successful build of Node.js 16.6.0+ build. Additionally, the C++ compiler needed by Node 16.6.1 is too new for LLVM 10, which Node.js uses. The Nix community is pushing to have the Nix use LLVM 11 instead, so there is some progress there. In the meantime, feel free to fork this repl (linked below) and use it. It has Node.js 16.6.1 installed through NPM and should work just fine until 16.6.0+ will be available through Nix (or we build it on our own ;)) - BTW, shoutout to moon for this tip! - le Replit team

TLDR: Apple baf, they why Node 16.6 not on Nix, use this for now:


so easy


Use the following command:

It will update your npm to the lastest.


@Wumi4 sadly its not working