Parameter of db.run should have been passed as an array when using multiple placeholders instead of a string. Solution:
db.run('INSERT INTO users VALUES(?, ?)', ['John', 'Doe'])db.close();