Ask coding questions

← Back to all posts
Updating npm version

So I'm making a discord bot, and when I updated the discord.js version I got errors saying that I need to update npm to 7.0.0, and currently im on 6.14.12


You are far from being the first person to ask this question within the past two weeks, just putting that out there.

Here is the official announcement made by Piero that explains things:

@everyone 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:


@SixBeeps so is therr a way to fix this or not?


@mhm0ud The block quote provides the solution to the issue.