The real question is "what is the it". The error is a symptom of something (a script of some sort probably) asking to do a command with sudo. So need to track down the cause.
Questions:
1) What were you doing immediately before the error?
2) What scripts do you have which might be doing an sudo?
3) Do knockknock and Malwarebytes
https://www.malwarebytes.com show anything bad?