Despite having specified the project ID when creating the BigQuery object, I'm getting this error about there not being one specified when trying to use table.import().
Environment details
- OS: Win 10 Pro
- Node.js version: v7.5.0
- npm version: v4.1.2
- google-cloud-node version: bigquery v0.7.0
Steps to reproduce
- require
@google-cloud/bigquery
- create
BigQuery object specifying projectId in options
- create
dataset object from BigQuery object, then table object from dataset
table.import(jsonFile).then(...);
Error
Sorry, we cannot connect to Google Cloud Services without a project ID. You may specify one with an environment variable named "GCLOUD_PROJECT". See https://googlecloudplatform.github.io/google-cloud-node/#/docs/guides/authentication for a detailed guide on creating an authenticated connection.
at Object.<anonymous> (%project%\node_modules\@google-cloud\common\src\util.js:55:29)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (%project%\node_modules\@google-cloud\common\src\service-object.js:32:12)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
Despite having specified the project ID when creating the
BigQueryobject, I'm getting this error about there not being one specified when trying to usetable.import().Environment details
Steps to reproduce
@google-cloud/bigqueryBigQueryobject specifyingprojectIdin optionsdatasetobject fromBigQueryobject, thentableobject fromdatasettable.import(jsonFile).then(...);Error