No. The error message is to check aesthetics and it tells you which linenumbers the code error is.
You will have code something like
ggplot(data=df, aes(x = xvals, y= yvals, group=group))
The AES may be in the ggplot line of the geom_
It may also be split across both.
data may be stated or passed through the %>% pipe
However, ggplot does not think your xvals, yvals and group are the same length. If you were plotting shoe size (Y) versus height (X) in boys and girls (group), and you have 30 children there should be 30 Y values, 30 X values and 30 corresponding boy or girl status. If your data is all in one data frame / tibble that is normally automatically the case.
But let's say you were not doing boy Vs girl but splitting your data into 4 groups sequentially, if you made group=1:4 that may appear to work - but it means the group level is actually 4 and ggplot doesn't know what to do.
To be more specific we need:
A sample dataset and the code chunk that breaks.
If you can't provide that, you need to look at your code. My starting point would be to do length(df$xvals) etc - or just inspect them. The other time I hit issues is where I've built the grouping and some delightful function gives results as a list so my group is not a 1:1 relationship to my X and Y values.