The simplest mongodb insert statement reports an error and asks for help! ! ! !

  node.js, question

The code is as follows. Such a simple insertion operation has always reported errors, while the following query operation has no problems. See the following figure for error information, Kneel to beg!

var mongo = require('mongodb'),
 Server = mongo.Server,
 Db = mongo.Db;
 var server = new Server('localhost', 27017, {auto_reconnect: true});
 var db = new Db('spa', server);, db) {
 if(!  err) {
 console.log("We are connected");
 db.collection('spa', function(err, collection) {
 var doc1 = {a: 1};
 collection.insert(doc1, {safe:true}, function(err, result) {
 if(err){ throw err;   };
 db.collection('spa', function(err, collection){
 collection.find().toArray(function(error, result){
 if(error){ throw error;   };


What is the mongodb server version?