title: server error message [ERR_INVALID_ARG_TYPE]:
body: <h2>I'm getting a error message on my server saying:
  TypeError [ERR_INVALID_ARG_TYPE]: The &quot;key&quot; argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, DataView, KeyObject, or CryptoKey.</h2>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"&gt;&lt;/script&gt;
  const express = require('express');
   const bodyParser = require('body-parser');
   const bcrypt = require('bcrypt-nodejs');
   const cors = require('cors');
   const knex = require('knex');
  const register = require('./controllers/register');
  const signin = require('./controllers/signin');
  const profile = require('./controllers/profile');
  const image = require('./controllers/image');
  
   const db = knex({
      client: 'pg',
      connection: {
        host : '127.0.0.1',
        user : 'postgres',
        password : '',
        database : 'smart-brain'
      }
    });
  
   const app = express();
  
   app.use(cors());
   app.use(bodyParser.json());
   
  
  app.get('/', (req, res)=&gt; {res.send(database.users) })
  
   app.post('/signin',  signin.handleSignin(db,bcrypt))
  
   app.post('/register', (req, res) =&gt; {register.handleRegister(req, res, db, bcrypt) })
  
   app.get('/profile/:id', (req, res)=&gt; {profile.handleProfileGet(req, res, db)})
  
   app.put('/image', (req, res) =&gt; {image.handleImage(req, res, db)})
  
  app.listen(3000, ()=&gt; {
    console.log('app is running on port 3000');
  })</code></pre>
  </div>
  </div>
  </p>