You have two options, both bindings against software created by the excellent LAME Project.
The lame npm package is a full-featured binding against the libmp3lame C library. I would recommend this unequivocally, except that it hasn't been updated in four years.
You could also use the node-lame npm package. It is a wrapper around the lame CLI tool, instead of the C library. The performance is much worse because of this, but it is simpler to use. It is also updated more frequently than the previously mentioned alternative.
You can use the wavefile npm package.
You should use the ogg npm package. The fork by @suldashi is much more frequently maintained than the primary repo. You might also need node-vorbis to handle decoding.