googleapis / googleapis/google-api-nodejs-client
dfareporting fails with "ctr is not a constructor"
- Vorherrschende Sprache
- TypeScript
- Sterne
- 12.2k
- Forks
- 2k
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 24
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Beginne mit den gemeldeten Stacktraces in node_modules/googleapis-common/build/src/apiIndex.js und node_modules/googleapis/build/src/apis/dfareporting/index.js und untersuche anschließend das installierte @googleapis/dfareporting-Paket und seine verfügbaren API-Versionen. Als abgeschlossen gilt die Aufgabe, wenn dfareporting v3.5 erfolgreich geladen wird und die Installation des Pakets die erwarteten v3.5-Dateien in node_modules bereitstellt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- nodejs, typescript
- Bereich
- api
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100