This error occurred in my Angular app fetching IDS from an observable. 

Solution

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);

 

 

Saved you some valuable time?

Received 100 so far from 4 kind contributors.