Ben Hybert
03/02/2023, 12:20 PM[11:47:45.842] #9 74.75 @calcom/web:build: Type error: Property 'flatMap' does not exist on type '{ connectedCalendars: ({ integration: { credential: { type: string; id: number; userId: number | null; key: JsonValue; appId: string | null; invalid: boolean | null; }; credentials: { ...; }[]; ... 31 more ...; __template?: string | undefined; }; credentialId: number; primary?: undefined; calendars?: undefined; erro...'.
[11:47:45.843] #9 74.75 @calcom/web:build:
[11:47:45.845] #9 74.75 @calcom/web:build: 85 | // get all the connected integrations' calendars (from third party)
[11:47:45.846] #9 74.75 @calcom/web:build: 86 | const connectedCalendars = await getConnectedCalendars(calendarCredentials, user.selectedCalendars);
[11:47:45.848] #9 74.75 @calcom/web:build: > 87 | const calendars = connectedCalendars.flatMap((c) => c.calendars).filter(notEmpty);
[11:47:45.849] #9 74.75 @calcom/web:build: | ^
[11:47:45.850] #9 74.75 @calcom/web:build: 88 | const selectableCalendars = calendars.map((cal) => {
[11:47:45.852] #9 74.75 @calcom/web:build: 89 | return { selected: selectedCalendarIds.findIndex((s) => s.externalId === cal.externalId) > -1, ...cal };
[11:47:45.854] #9 74.75 @calcom/web:build: 90 | });
[11:47:45.855] #9 74.97 @calcom/web:build: error Command failed with exit code 1.