Unhandled Rejection (TypeError): gapi.client.calendar is undefined
Closed this issue · 3 comments
I have built against nodejs 14.8 on both Windows 11 and Ubuntu 21.10.
I use Gsuite accounts and have created a web API client/secret in the dev portal. It appears to successfully authenticate, however, I receive the below error when trying to load my calendar when hosting from with Win or Ubuntu.
Unhandled Rejection (TypeError): gapi.client.calendar is undefined
GCalendarIntegration/this.loadEventsFromGoogle
src/components/GCalendarIntegration.tsx:95
92 | const events = new Array();
93 |
94 | // resolve colors
95 | this.colors = (await gapi.client.calendar.colors.get()).result.calendar;
| ^
96 |
97 | // resolve the calendars
98 | const calendarsRes = await gapi.client.calendar.calendarList.list();
Homepage.pdf
I have confirmed there is no issue on the GitHub hosted page https://pauloo27.github.io/homepage/ .
Could the issue be with package versions being downloaded?
Hello! Thanks for using the homepage.
Can you please double check if the calendar API is enabled in the API key credentials you are using?
Also, can you test accessing it with a browser that you never accessed before (I think a incognito tab from your default browser might work).
Hi Pauloo27, my apologies, I think it was operator error with the API key. Thanks for the great project and support.