example/sftp-server-download-only.js cannot read property 'OPEN_MODE' of undefined
checked out the project yarn add ssh2 cd example node sftp-server-download-only.js
getting error 'Cannot read property 'OPEN_MODE' of undefined'
node version is 12.22.2

Please advise...
Try utils: { sftp: ... }
that worked, thank you! please update your example.
I changed to this:
const { Server, utils: {sftp: { OPEN_MODE, STATUS_CODE, }}, } = require('ssh2');
But it is the new error: `new ssh2.Server({ ^
ReferenceError: ssh2 is not defined`
What is wrong?
@SantyTaco remove the 'ssh2.' before 'Server'. The var 'Server' doesn't need the package name at this point. I don't know enough about JS to guess how that got there.