calculate KNN variable importance in r

When I use varImp and it shows the error like the picture, how can i fix it......

Here is my model2!