googleapis / googleapis/google-api-nodejs-client

dfareporting fails with "ctr is not a constructor"

Open
#2,890 1 comment 0 reactions 0 assignees View on GitHub
priority: p3 type: question
Dominant language
TypeScript
Stars
12.2k
Forks
2k
Avg merge
1d 9h
Merged PRs (30d)
24

Description

dfareporting v3.4 was sunset the a couple weeks ago and migrating to 3.5 hasn't been going smoothly.

doing this -

const { google } = require("googleapis");

this.dfareporting = google.dfareporting({
version: "v3.5",
auth: this.auth,
})

results in -
`Error: Unable to load endpoint dfareporting("v3.5"): ctr is not a constructor
at Object.getAPI (\node_modules\googleapis-common\build\src\apiIndex.js:36:15)
at GoogleApis.dfareporting (\node_modules\googleapis\build\src\apis\dfareporting\index.js:24:32)`

and when I try to revert to 3.4 -

this.dfareporting = google.dfareporting({
version: "v3.4",
auth: this.auth,
})

results in -

403 DCM Service Error: 3140 : Version v3.4 of the DCM/DFA Trafficking and Reporting API is no longer supported. Please upgrade
to the latest version of the API.

So I'm not sure what to do, and also running `$ npm install @googleapis/dfareporting` doesn't update node_modules with v3.5.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.