I’ve noticed that this occurs for me when I try import a dodgy csv file or a weird character seems to be in the file.
Check encoding of both the file type when you make the csv and also make sure readr is using same encoding.
Another thing you could do is go into the file explorer window of Rstudio, click the file, and then select the import dataset button. It will then open the file in the Rstudio source editor and for me at least the troublesome characters were highlighted, making it easy to just delete them and reload with readr.
IMO file/date encoding issues are my most despised ‘feature’ or R