Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid parameter v1.4 for adsense #1531

Closed
marcoslgm opened this issue Jan 5, 2019 · 0 comments
Closed

Invalid parameter v1.4 for adsense #1531

marcoslgm opened this issue Jan 5, 2019 · 0 comments
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@marcoslgm
Copy link

Hey there!

When I try to create an instance of adsense API in a typescript file, only version "v1_4" can be passed. But the correct string is "v1.4" because these is the only one key declared in VERSIONS variable.

So, when I execute const adsense = google.adsense('v1_4') the following error is returned:

.../node_modules/googleapis-common/build/src/apiIndex.js:36
        throw new Error(`Unable to load endpoint ${api}("${version}"): ${e.message}`);
        ^

Error: Unable to load endpoint adsense("v1_4"): ctr is not a constructor
    at Object.getAPI (.../node_modules/googleapis-common/build/src/apiIndex.js:36:15)

Environment details

  • Node.js version: 11.0.0
  • npm version: 6.4.1
  • googleapis version: 36.0.0

Steps to reproduce

  1. Install googleapis
  2. Write in a file.ts const adsense = google.adsense('v1_4')
  3. Compile with tsc file.ts
  4. Execute with node the generated file.js

I fixed it, renaming the version "v1_4" by "v1.4" in this line

That's all,

Thanks!

@JustinBeckwith JustinBeckwith added triage me I really want to be triaged. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Jan 22, 2019
@yoshi-automation yoshi-automation removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Jan 28, 2019
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants