Creating Table in sqlite3 gives an error

I am currently trying to create a table in sqlite3 but every time I try to insert a new value it just gives an error:

[Error: SQLITE_ERROR: no such table: accounts
Emitted 'error' event on Statement instance at:
] {
  errno: 1,
  code: 'SQLITE_ERROR'

const server = require('http').createServer();
const io = require('')(server);
const moment = require('moment');
const now = moment().format('DD/MM/YYYY').toString();

var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(':memory:');`CREATE TABLE IF NOT EXISTS accounts (username TEXT,password TEXT,joined TEXT)`);`INSERT INTO accounts VALUES ("TEST","TEST",`+now+`)`);

Does anyone know how to fix this?

You’d want to wait for the CREATE TABLE to run before starting on the INSERT. This package has a serialize wrapper thing to run them that way. See this doc on the matter.