title: I am trying to update the user password in a MERN stack app, but i keep grtting this error "Error: TypeError: updtUser.save is not a function"
body: <pre><code>const users = require('../models/users.model') 
  const CryptoJS = require(&quot;crypto-js&quot;)
  </code></pre>
  <p>// Update existing user</p>
  <p>Blockquote</p>
  <pre><code>const updatePwdTmpLnk =  (req, res) =&gt;{ 
  
    console.log(&quot;Update temp password endpoint was hit: &quot;+req.body.password0)  
    
  
    users.find({findEmail}).then(updtUser =&gt; {
        
      updtUser.password = CryptoJS.MD5(req.body.password0).toString(); 
  
      updtUser.save()
        .then(() =&gt; {
          console.log('Password updated!')
          res.render('dashboard')
      }) 
    })
    .catch(err =&gt; res.status(400).json('Error: ' + err)) 
                        
      function findEmail(users){
        return users.email_add === &quot;kpbarasa@gmail.com&quot;
      }  
  
  }
  </code></pre>
  <p>When i run this code i keep getting this error &quot;Error: TypeError: updtUser.save is not a function&quot;</p>