Ssh2-ftp-client not working in workflow

Hi there,
I am trying to upload a file to SFTP within a workflow.

I created the following code block (JavaScript)

const Client = import('ssh2-sftp-client');
const sftp = new Client();

const host = 'host';
const port = 22;
const username = 'user';
const password = 'pw';
const remotePath = 'remote.csv';
const dataString = "examplestring";

return new Promise((resolve, reject) => {
    sftp.connect({
        host,
        port,
        username,
        password
    })
    .then(() => {
        return sftp.put(Buffer.from(dataString), remotePath);
    })
    .then(() => {
        return sftp.end();
    })
    .then(() => {
        resolve({ status: 'success', message: 'success' });
    })
    .catch(err => {
        sftp.end();  
        reject("error connecting: " + err.message);
    });
});

But I get the error:
connect: getConnection: abort(RangeError: WebAssembly.instantiate(): Out of memory: wasm memory)
Any idea what goes wrong?