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

TypeError: google[api.name] is not a function #17

Open
AliPST opened this issue Jan 3, 2019 · 5 comments
Open

TypeError: google[api.name] is not a function #17

AliPST opened this issue Jan 3, 2019 · 5 comments

Comments

@AliPST
Copy link

AliPST commented Jan 3, 2019

Hi,

I get an error ("TypeError: google[api.name] is not a function"), at this statement (exactly at line 123):
var api = decodeAPI(node.api); api = google[api.name]({ version: api.version, auth: auth });

It looks like the "google" variable does not get initialized as expected. I am saying that b/c "google.discovery('v1');" works fine (and it populates the api list and operation), but "google[api.name]" does not.
I even tried to change the code and statically call the api that I need (e.g. _google.dialogflow), but I got the same error.

Any idea?

Here are the environment settings and conditions:

@danleighton
Copy link

Did you work this out in the end?

Not sure what is going on here and getting the same error.

@AliPST
Copy link
Author

AliPST commented Jul 22, 2019 via email

@danleighton
Copy link

Ah, I have used that node for dialogflow. But I need to be able to use a whole heap of APIs. I don't think that one can be used for anything except Dialogflow? Or is it more flexible than that... I don't imagine it is?

@AliPST
Copy link
Author

AliPST commented Jul 22, 2019

you are right. it is only for the dialogflow.
It's been a while since I worked on this issue and honestly, i don't remember the details about it. But I have a vague memory that this library wasn't an independent thing, and it was part of a bigger library, without which it is not fully functional. Take this with a grain of salt...

@danleighton
Copy link

That is the Viseo Google Library I think you are thinking of - which is part of a bigger library. It's kind of cool, but uses an old version of NodeRed - so not so good. And a pain to install. Pity.

Thanks for the help. Best wishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants