salesforce-marketingcloud / FuelSDK-Node

BSD 3-Clause "New" or "Revised" License
49 stars 24 forks source link

[Enhancement] Support for Node 14 #42

Open jgtvares opened 3 years ago

jgtvares commented 3 years ago

Is your feature request related to a problem? Please describe The lib doesn't support Node 14. When calling client.dataExtensionRow(...).get(...), the fs library returns an error: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object. This is the faulty line:

// CacheService.js
_getOrCreateFile() {
    ...
    return this._writeFile({flag: 'wx'}).then(...)
}

Describe the solution you'd like Update the lib to support Node 14.

Describe alternatives you've considered Changing the _writeFile method to something like this: _writeFile("wx") works fine! That's because newer version of fs expects a string for file content.

Additional context Add any other context or screenshots about the feature request here.

DougMidgley commented 1 year ago

Feel free to check out https://www.npmjs.com/package/sfmc-sdk :)