This resolved my issue: I added a callback function as an argument to the findOneAndReplace.
callback=(error,data)=>{if(error){console.log(error}
else {console.log(data)}
User.findOneAndUpdate({original: userInput},{original: userInput, processString: outPut} , {new: true, upsert: true}, callback);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…