Open AliPST opened 5 years ago
Did you work this out in the end?
Not sure what is going on here and getting the same error.
We finally couldn't fix the problem, and instead we used the following library: https://flows.nodered.org/node/node-red-contrib-dialogflowv2-api
On Mon, Jul 22, 2019 at 8:20 AM Dan Leighton notifications@github.com wrote:
Did you work this out in the end?
Not sure what is going on here and getting the same error.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/74Labs/node-red-contrib-google/issues/17?email_source=notifications&email_token=AGKCHXDEE2C4QIU3BH63DOTQAWQX3A5CNFSM4GNBTA2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2PXUBI#issuecomment-513767941, or mute the thread https://github.com/notifications/unsubscribe-auth/AGKCHXFKQ5HBFX6SXRPQYETQAWQX3ANCNFSM4GNBTA2A .
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?
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...
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.
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:
-- googleapis@15.1.0 | +-- async@2.1.5 | |
-- lodash@4.17.11 deduped | +-- google-auth-library@0.9.10 | | +-- async@1.4.2 | | +-- gtoken@1.2.3 | | | +-- google-p12-pem@0.1.2 | | | |-- node-forge@0.7.6 | | | +-- jws@3.1.5 | | | | +-- jwa@1.1.6 deduped | | | |
-- safe-buffer@5.1.2 deduped | | | +-- mime@1.6.0 | | |-- request@2.88.0 | | | +-- aws-sign2@0.7.0 deduped | | | +-- aws4@1.8.0 deduped | | | +-- caseless@0.12.0 deduped | | | +-- combined-stream@1.0.7 deduped | | | +-- extend@3.0.2 deduped | | | +-- forever-agent@0.6.1 deduped | | | +-- form-data@2.3.3 deduped | | | +-- har-validator@5.1.3 deduped | | | +-- http-signature@1.2.0 deduped | | | +-- is-typedarray@1.0.0 deduped | | | +-- isstream@0.1.2 deduped | | | +-- json-stringify-safe@5.0.1 deduped | | | +-- mime-types@2.1.21 deduped | | | +-- oauth-sign@0.9.0 deduped | | | +-- performance-now@2.1.0 deduped | | | +-- qs@6.5.2 deduped | | | +-- safe-buffer@5.1.2 deduped | | | +-- tough-cookie@2.4.3 deduped | | | +-- tunnel-agent@0.6.0 deduped | | |
-- uuid@3.3.2 deduped | | +-- jws@3.0.0 | | | +-- base64url@1.0.6 | | | | +-- concat-stream@1.4.11 | | | | | +-- inherits@2.0.3 deduped | | | | | +-- readable-stream@1.1.14 | | | | | | +-- core-util-is@1.0.2 deduped | | | | | | +-- inherits@2.0.3 deduped | | | | | | +-- isarray@0.0.1 | | | | | |-- string_decoder@0.10.31 | | | | |
-- typedarray@0.0.6 | | | |-- meow@2.0.0 | | | | +-- camelcase-keys@1.0.0 | | | | | +-- camelcase@1.2.1 | | | | |
-- map-obj@1.0.1 | | | | +-- indent-string@1.2.2 | | | | | +-- get-stdin@4.0.1 | | | | | +-- minimist@1.2.0 | | | | |-- repeating@1.1.3 | | | | |
-- is-finite@1.0.2 | | | | |-- number-is-nan@1.0.1 deduped | | | | +-- minimist@1.2.0 | | | |
-- object-assign@1.0.0 | | |-- jwa@1.0.2 | | | +-- base64url@0.0.6 | | | +-- buffer-equal-constant-time@1.0.1 | | |
-- ecdsa-sig-formatter@1.0.10 | | |-- safe-buffer@5.1.2 deduped | | +-- lodash.noop@3.0.1 | | +-- request@2.74.0 | | | +-- aws-sign2@0.6.0 | | | +-- aws4@1.8.0 deduped | | | +-- bl@1.1.2 | | | |
-- readable-stream@2.0.6 | | | | +-- core-util-is@1.0.2 deduped | | | | +-- inherits@2.0.3 deduped | | | | +-- isarray@1.0.0 deduped | | | | +-- process-nextick-args@1.0.7 | | | | +-- string_decoder@0.10.31 | | | |-- util-deprecate@1.0.2 deduped | | | +-- caseless@0.11.0 | | | +-- combined-stream@1.0.7 deduped | | | +-- extend@3.0.2 deduped | | | +-- forever-agent@0.6.1 deduped | | | +-- form-data@1.0.1 | | | | +-- async@2.6.1 | | | | |
-- lodash@4.17.11 deduped | | | | +-- combined-stream@1.0.7 deduped | | | |-- mime-types@2.1.21 deduped | | | +-- har-validator@2.0.6 | | | | +-- chalk@1.1.3 | | | | | +-- ansi-styles@2.2.1 | | | | | +-- escape-string-regexp@1.0.5 | | | | | +-- has-ansi@2.0.0 | | | | | |
-- ansi-regex@2.1.1 deduped | | | | | +-- strip-ansi@3.0.1 deduped | | | | |-- supports-color@2.0.0 | | | | +-- commander@2.19.0 | | | | +-- is-my-json-valid@2.19.0 | | | | | +-- generate-function@2.3.1 | | | | | |
-- is-property@1.0.2 | | | | | +-- generate-object-property@1.2.0 | | | | | |-- is-property@1.0.2 deduped | | | | | +-- is-my-ip-valid@1.0.0 | | | | | +-- jsonpointer@4.0.1 | | | | |
-- xtend@4.0.1 deduped | | | |-- pinkie-promise@2.0.1 | | | |
-- pinkie@2.0.4 | | | +-- hawk@3.1.3 | | | | +-- boom@2.10.1 | | | | |-- hoek@2.16.3 deduped | | | | +-- cryptiles@2.0.5 | | | | |
-- boom@2.10.1 deduped | | | | +-- hoek@2.16.3 | | | |-- sntp@1.0.9 | | | |
-- hoek@2.16.3 deduped | | | +-- http-signature@1.1.1 | | | | +-- assert-plus@0.2.0 | | | | +-- jsprim@1.4.1 deduped | | | |-- sshpk@1.15.2 deduped | | | +-- is-typedarray@1.0.0 deduped | | | +-- isstream@0.1.2 deduped | | | +-- json-stringify-safe@5.0.1 deduped | | | +-- mime-types@2.1.21 deduped | | | +-- node-uuid@1.4.8 | | | +-- oauth-sign@0.8.2 | | | +-- qs@6.2.3 | | | +-- stringstream@0.0.6 | | | +-- tough-cookie@2.3.4 | | | |
-- punycode@1.4.1 | | |-- tunnel-agent@0.4.3 | |
-- string-template@0.2.1 | `-- string-template@1.0.0