javascript – How can I stream MP3 From JS-client to Node.JS-server

I’m trying to stream audio from a client to server (Node.JS).
The code is written in JS.

I’m able to stream WAV (from client to server) but not MP3.

Here is the code:

fs = require('fs'),
lame = require('node-lame');

            case "WAV":
                fileWriter = new wav.FileWriter(fileName + ".wav", {
                    channels: 1,
                    sampleRate: meta.sampleRate,
                    bitDepth: 16 });

            case "MP3":
                writeStream = fs.createWriteStream( fileName + ".mp3" );
                stream.pipe( new lame.Encoder(
                    channels: 1, bitDepth: 16, sampleRate: meta.sampleRate, bitRate: 128, outSampleRate: 22050, mode: lame.MONO
                .pipe( writeStream );

but this not work and I get:

   stream.pipe( new lame.Encoder(
TypeError: lame.Encoder is not a constructor

How can I stream MP3?