title: TypeError: jwt.sign is not a function
body: <p>I include the express, etc including:</p>
  
  <pre><code>var expressJwt = require('express-jwt'); //https://npmjs.org/package/express-jwt
  var secret = 'this is the secret secret secret 12356';
  var jwt = require('jsonwebtoken');  //https://npmjs.org/package/node-jsonwebtoken
  </code></pre>
  
  <p>then define my sequelize models and epilogue routes and place this here:</p>
  
  <pre><code>app.post('/authenticate', function (req, res) {
    //TODO validate req.body.username and req.body.password
    //if is invalid, return 401
    if (!(req.body.username === 'john.doe' &amp;&amp; req.body.password === 'foobar')) {
      res.status(401).send('Wrong user or password');
      return;
    }
  
    var profile = {
      first_name: 'John',
      last_name: 'Doe',
      email: 'john@doe.com',
      id: 123
    };
  
    // We are sending the profile inside the token
    var token = jwt.sign(profile, secret, { expiresInMinutes: 60*5 });
  
    res.json({ token: token });
  });
  </code></pre>
  
  <p>When I enter john.doe and foobar in a form, I get told by console that jwt.sign is not a function, even after an npm install.</p>