I generated a basic app using create-react-app, and in the app installed the @google-cloud/bigquery module with npm install --save @google-cloud/bigquery. I tried simply importing the module by adding import * as BigQuery from '@google-cloud/bigquery'; to the src/App.js file, and when I open the web page, it displays the following errors:
Uncaught TypeError: Cannot convert undefined or null to object
at Function.getPrototypeOf (<anonymous>)
at ./node_modules/google-auth-library/node_modules/pify/index.js.module.exports (index.js:75)
at Object../node_modules/google-auth-library/node_modules/gtoken/build/src/index.js (index.js:54)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object../node_modules/google-auth-library/build/src/auth/jwtclient.js (jwtclient.js:63)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object.<anonymous> (googleauth.js:73)
at Object../node_modules/google-auth-library/build/src/auth/googleauth.js (googleauth.js:815)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object../node_modules/google-auth-library/build/src/index.js (index.js:18)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object.<anonymous> (index.js:6)
at Object../node_modules/google-auto-auth/index.js (index.js:377)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object../node_modules/@google-cloud/common/src/util.js (util.js:27)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object../node_modules/@google-cloud/common/src/service-object.js (service-object.js:32)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object../node_modules/@google-cloud/common/src/operation.js (operation.js:31)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object../node_modules/@google-cloud/common/src/index.js (index.js:27)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object.<anonymous> (index.js:20)
at Object../node_modules/@google-cloud/bigquery/src/index.js (index.js:1448)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object../src/App.js (App.css?9a66:26)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object../src/index.js (index.css?f255:26)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at fn (bootstrap b9222e6f9a2beb020d02:88)
at Object.1 (lib crypto:1)
at __webpack_require__ (bootstrap b9222e6f9a2beb020d02:678)
at ./node_modules/@google-cloud/bigquery/package.json.module.exports._from (bootstrap b9222e6f9a2beb020d02:724)
at bootstrap b9222e6f9a2beb020d02:724
I don't know much of now node and React work yet, so forgive me if this question is ill-posed. I would like to use this to pull data from BigQuery and display it in my web app, but blindly following the instructions for how to use this module doesn't work here, or on another computer as I tried to do.