square / square-nodejs-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReferenceError: BigInt is not defined

singhlalit755 opened this issue · comments

ReferenceError: BigInt is not defined
at Object.coerceStringOrNumberToBigInt (/var/www/html/server/node_modules/@A pimatic/schema/dist/schema.cjs.development.js:151:38)
at Object.unmap (/var/www/html/server/node_modules/@apimatic/schema/dist/sch ema.cjs.development.js:1294:55)
at Object.unmap (/var/www/html/server/node_modules/@apimatic/schema/dist/sch ema.cjs.development.js:1169:46)
at Object.unmap (/var/www/html/server/node_modules/@apimatic/schema/dist/sch ema.cjs.development.js:790:48)
at Object.unmap (/var/www/html/server/node_modules/@apimatic/schema/dist/sch ema.cjs.development.js:1169:46)
at Object.validateAndUnmap (/var/www/html/server/node_modules/@apimatic/sche ma/dist/schema.cjs.development.js:228:22)
at DefaultRequestBuilder.prepareArgs (/var/www/html/server/node_modules/squa re/dist/square.cjs.development.js:16153:37)
at PaymentsApi._callee2$ (/var/www/html/server/node_modules/square/dist/squa re.cjs.development.js:11324:28)
at tryCatch (/var/www/html/server/node_modules/square/dist/square.cjs.develo pment.js:276:40)
at Generator.invoke [as _invoke] (/var/www/html/server/node_modules/square/d ist/square.cjs.development.js:506:22)
at Generator.next (/var/www/html/server/node_modules/square/dist/square.cjs. development.js:331:21)
at asyncGeneratorStep (/var/www/html/server/node_modules/square/dist/square. cjs.development.js:17:24)
at _next (/var/www/html/server/node_modules/square/dist/square.cjs.developme nt.js:39:9)
at /var/www/html/server/node_modules/square/dist/square.cjs.development.js:4 6:7
at new Promise ()
at PaymentsApi. (/var/www/html/server/node_modules/square/dist/sq uare.cjs.development.js:35:12)
at PaymentsApi.createPayment (/var/www/html/server/node_modules/square/dist/ square.cjs.development.js:11339:29)

This is most likely related to #24. @singhlalit755 please let me know if the workaround there doesn't help you.

@singhlalit755 are you using Node 10.4.0 or greater? BigInt was added to Node in version 10.4.0 so you'll need at least that version.

Yeah that worked thanks.