{"action":"closed","issue":{"url":"https://api.github.com/repos/firebase/functions-samples/issues/330","repository_url":"https://api.github.com/repos/firebase/functions-samples","labels_url":"https://api.github.com/repos/firebase/functions-samples/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/firebase/functions-samples/issues/330/comments","events_url":"https://api.github.com/repos/firebase/functions-samples/issues/330/events","html_url":"https://github.com/firebase/functions-samples/issues/330","id":300373716,"number":330,"title":"\"OAuth2Client is not a constructor\" for google-sheet-sync","user":{"login":"PaulSteenkisteKrikey","id":29927500,"avatar_url":"https://avatars0.githubusercontent.com/u/29927500?v=4","gravatar_id":"","url":"https://api.github.com/users/PaulSteenkisteKrikey","html_url":"https://github.com/PaulSteenkisteKrikey","followers_url":"https://api.github.com/users/PaulSteenkisteKrikey/followers","following_url":"https://api.github.com/users/PaulSteenkisteKrikey/following{/other_user}","gists_url":"https://api.github.com/users/PaulSteenkisteKrikey/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulSteenkisteKrikey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulSteenkisteKrikey/subscriptions","organizations_url":"https://api.github.com/users/PaulSteenkisteKrikey/orgs","repos_url":"https://api.github.com/users/PaulSteenkisteKrikey/repos","events_url":"https://api.github.com/users/PaulSteenkisteKrikey/events{/privacy}","received_events_url":"https://api.github.com/users/PaulSteenkisteKrikey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"nicolasgarnier","id":3766663,"avatar_url":"https://avatars1.githubusercontent.com/u/3766663?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolasgarnier","html_url":"https://github.com/nicolasgarnier","followers_url":"https://api.github.com/users/nicolasgarnier/followers","following_url":"https://api.github.com/users/nicolasgarnier/following{/other_user}","gists_url":"https://api.github.com/users/nicolasgarnier/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasgarnier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasgarnier/subscriptions","organizations_url":"https://api.github.com/users/nicolasgarnier/orgs","repos_url":"https://api.github.com/users/nicolasgarnier/repos","events_url":"https://api.github.com/users/nicolasgarnier/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasgarnier/received_events","type":"User","site_admin":false},"assignees":[{"login":"nicolasgarnier","id":3766663,"avatar_url":"https://avatars1.githubusercontent.com/u/3766663?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolasgarnier","html_url":"https://github.com/nicolasgarnier","followers_url":"https://api.github.com/users/nicolasgarnier/followers","following_url":"https://api.github.com/users/nicolasgarnier/following{/other_user}","gists_url":"https://api.github.com/users/nicolasgarnier/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasgarnier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasgarnier/subscriptions","organizations_url":"https://api.github.com/users/nicolasgarnier/orgs","repos_url":"https://api.github.com/users/nicolasgarnier/repos","events_url":"https://api.github.com/users/nicolasgarnier/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasgarnier/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2018-02-26T19:53:59Z","updated_at":"2018-03-11T21:46:11Z","closed_at":"2018-03-11T21:46:11Z","author_association":"NONE","body":"I am receiving the following error when attempting to deploy the google-sheet-sync function: \r\n\r\n> TypeError: OAuth2Client is not a constructor\r\n\r\nThe error points to line 45 in the index file:\r\n\r\n`const functionsOauthClient = new OAuth2Client(CONFIG_CLIENT_ID, CONFIG_CLIENT_SECRET, FUNCTIONS_REDIRECT);`\r\n\r\nI go through the 14 steps laid out exactly, configuring all the IDs and everything else. I believe the issue might also have to do with line 22 in the index file:\r\n\r\n`const {OAuth2Client} = require('google-auth-library');`\r\n\r\nElsewhere (e.g. [on stack overflow here](https://stackoverflow.com/questions/48242920/google-calendar-api-and-node-js-googleauth-is-not-a-constructor-issue) and [on Google's GitHub here](https://github.com/google/google-auth-library-nodejs/issues/251)) people have talked about how the syntax for the OAuth2Client class and the GoogleAuth class was altered slightly, but this code reflects that change and this issue remains."}}
{"actor":{"display_login":"nicolasgarnier"}}