title: TypeError: string.padStart is not a function
body: <p>The below code is a node JS function. I Was trying to run it from Postman and I am getting "TypeError: cartItem.findOne() is not a function". </p>
  
  <p>later I tried to run other WORKING function and got the same error saying " TypeError: item.padStart' is not a function. I am getting the same error for all the functions. </p>
  
  <p>Does it has something to do with the versions? </p>
  
  <p>I tried updating all the node dependencies, deleted and pulled the working code and still getting the same error.</p>
  
  <p>Downloaded a different ID and executed from there, also getting the same error.</p>
  
  <p>Deleted and pulled the code from GIT master and still getting the same error.</p>
  
  <p>Executed using VScode and JetBrains.</p>
  
  <pre><code>const cartItem = require('../models/Cart');
  
  const addItemToCart = (context,req) =&gt;{
      let itemInfo = JSON.parse(req.body);
  
              cartItem.findOne({
                  NID: req.headers.NID
              })
          }
  </code></pre>
  
  <p>The below line is from different function:</p>
  
  <pre><code>item.padStart(13, "0");
  </code></pre>
  
  <p>Please let me know, if you need further information. Appreciate your help.</p>