Problems integrating Dropbox NPM

So I found a different example on the internet and tried it and this seems to work:

const { Dropbox } = require('dropbox');

Then I use ‘Dropbox’ directly as in:

// Get DB access token
let token = await getSecret("dbat");
// Get folder for items
let xferfolder = "/" + await getSecret("dbpx");
// Get a dropbox object
let dbx = new Dropbox({ accessToken: token, fetch: fetch });
// List the contents
results = await dbx.filesListFolder({path: xferfolder});

Not sure why a ‘require’ seems to be needed here when it isn’t with the other variables I reference from import statements, but apparently it is.