mintable
mintable copied to clipboard
TypeError: accounts.flat is not a function
Steps to Reproduce:
- Set up Plaid integration
- Set up Google Sheets integration
- Add a few bank accounts
- Run mintable fetch
Error: 2020-10-07T04:11:28.556Z [INFO] Fetched 1 sub-accounts and 14 transactions. (node:11391) UnhandledPromiseRejectionWarning: TypeError: accounts.flat is not a function at /usr/local/lib/node_modules/mintable/lib/scripts/fetch.js:104:26 at step (/usr/local/lib/node_modules/mintable/lib/scripts/fetch.js:44:23) at Object.next (/usr/local/lib/node_modules/mintable/lib/scripts/fetch.js:25:53) at fulfilled (/usr/local/lib/node_modules/mintable/lib/scripts/fetch.js:16:58) at process._tickCallback (internal/process/next_tick.js:68:7) (node:11391) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:11391) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
System Info:
arch: x64
platform: linux
os: v5.4.0-7642-generic
mintable: v2.0.1
node: v10.19.0
Hey @jmuthalaly!
I was able to reproduce your error and fix it.
Basically your node version is too old. array.flat was introduced to node in 11.0.0 (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat).
Upgrading to node >= 11.0.0, should fix it!
@kevinschaich, perhaps node >= 11.0.0, should be mentioned as requirement in docs. βΊοΈ
Cheers!
yes it should, you helped me with my issue!