javascript - Error in Auth Google Video API -


i'm trying use google api:

i downloaded sample project , followed steps are:

1) cd project folder api video

2) npm install

3) set gcloud_project = neorisvideo

4) downloaded json credential , inserted inside project folder

5) ran command node analyze.js labels-file resources / cat.mp4

and gave following error:

error: error: not load default credentials. browse https://developers.google.com/accounts/docs/application-default-credentials more information. @ c:\users\thiago.saad\downloads\nodejs-docs-samples-master\nodejs-docs-samples-master\video\node_modules\google-auth-library\lib\auth\googleauth.js:316:21 @ c:\users\thiago.saad\downloads\nodejs-docs-samples-master\nodejs-docs-samples-master\video\node_modules\google-auth-library\lib\auth\googleauth.js:346:7 @ request._callback (c:\users\thiago.saad\downloads\nodejs-docs-samples-master\nodejs-docs-samples-master\video\node_modules\google-auth-library\lib\transporters.js:70:30) @ self.callback (c:\users\thiago.saad\downloads\nodejs-docs-samples-master\nodejs-docs-samples-master\video\node_modules\request\request.js:188:22) @ emitone (events.js:96:13) @ request.emit (events.js:188:7) @ request.onrequesterror (c:\users\thiago.saad\downloads\nodejs-docs-samples-master\nodejs-docs-samples-master\video\node_modules\request\request.js:884:8) @ emitone (events.js:96:13) @ clientrequest.emit (events.js:188:7) @ socket.socketerrorlistener (_http_client.js:309:9) (node:9196) unhandledpromiserejectionwarning: unhandled promise rejection (rejection id: 1): error: not load default credentials. browse https://developers.google.com/accounts/docs/application-default-credentials more information. (node:9196) unhandledpromiserejectionwarning: unhandled promise rejection (rejection id: 2): error: not load default credentials. browse https://developers.google.com/accounts/docs/application-default-credentials more information. (node:9196) unhandledpromiserejectionwarning: unhandled promise rejection (rejection id: 3): error: not load default credentials. browse https://developers.google.com/accounts/docs/application-default-credentials more information. (node:9196) unhandledpromiserejectionwarning: unhandled promise rejection (rejection id: 4): error: not load default credentials. browse https://developers.google.com/accounts/docs/application-default-credentials more information.

you need create environment variable point json file:

google_application_credentials=/home/user/project/google.json


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -