ggplot error index is visible but shapefile not

The coordinates data must be passed to the map argument of the geom_map() function.

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.