FuelSDK-Node
FuelSDK-Node copied to clipboard
[Enhancement] Support for Node 14
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.
Feel free to check out https://www.npmjs.com/package/sfmc-sdk :)