This error occurred in my Angular app fetching IDS from an observable.
Changed the line from:
const ids = this.userService.userBooks$.value.map(({ id }) => id);
to:
const ids = this.userService.userBooks$.value.map(({ id }: {id: any}) => id);