nodejs-bigquery icon indicating copy to clipboard operation
nodejs-bigquery copied to clipboard

TypeError: Right-hand side of 'instanceof' is not callable

Open jdai1 opened this issue 2 years ago • 0 comments

Thanks for stopping by to let us know something could be better!

Environment details

  • OS: MacOS 13.4.1
  • Node.js version: 20.3.0
  • yarn version: 1.22.19
  • @google-cloud/bigquery version: 7.3.0

Steps to reproduce

try { await bigquery .dataset("QgBigQuery") .table("QuestionAttempts") .insert([newAttempt]); } catch (e) { console.log("Error adding question attempt to BigQuery"); console.log(e); } I am receiving the following error

TypeError: Right-hand side of 'instanceof' is not callable at Function.encodeValue_ (webpack-internal:///(sc_server)/./node_modules/@google-cloud/bigquery/build/src/table.js:394:19) at eval (webpack-internal:///(sc_server)/./node_modules/@google-cloud/bigquery/build/src/table.js:1062:33) at Array.map (<anonymous>) at Table._insert (webpack-internal:///(sc_server)/./node_modules/@google-cloud/bigquery/build/src/table.js:1060:30) at Table._insertWithRetry (webpack-internal:///(sc_server)/./node_modules/@google-cloud/bigquery/build/src/table.js:1031:35) at Table._insertAndCreateTable (webpack-internal:///(sc_server)/./node_modules/@google-cloud/bigquery/build/src/table.js:994:31) at Table.insert (webpack-internal:///(sc_server)/./node_modules/@google-cloud/bigquery/build/src/table.js:974:30) at eval (webpack-internal:///(sc_server)/./node_modules/@google-cloud/promisify/build/src/index.js:56:28) at new Promise (<anonymous>) at Table.wrapper (webpack-internal:///(sc_server)/./node_modules/@google-cloud/promisify/build/src/index.js:42:16) at POST (webpack-internal:///(sc_server)/./src/app/api/updateUserAttempts/route.ts:63:76) at async eval (webpack-internal:///(sc_server)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:244:37)

This issue has been seen before in #269! However, I didn't see a fix for it. Can anyone tell me why this is happening?

Thanks!

jdai1 avatar Oct 05 '23 04:10 jdai1