在模式文件中添加一个字段给出和错误,同时执行该文件

嗨,这是我已经有的模式文件。

// defining a mongoose schema // including the module var mongoose = require('mongoose'); // declare schema object. var Schema = mongoose.Schema; var blogSchema = new Schema({ title : {type:String,default:'',required:true }, subTitle : {type:String,default:''}, blogBody : {type:String,default:''}, tags : [],// name of tags in array created : {type:Date}, lastModified : {type:Date}, authorInfo : {} // information of author in form of obje-ct }); mongoose.model('Blog',blogSchema); 

当我添加bewlow两个fileds的架构中的文件

  userName : {type:String,default:''} , passWord : {type:String,default:''} like // defining a mongoose schema // including the module var mongoose = require('mongoose'); // declare schema object. var Schema = mongoose.Schema; var blogSchema = new Schema({ title : {type:String,default:'',required:true}, subTitle : {type:String,default:''}, blogBody : {type:String,default:''}, tags : [],// name of tags in array created : {type:Date}, lastModified : {type:Date}, authorInfo : {} // information of author in form of obje-ct userName : {type:String,default:''} ,----------------------------------here passWord : {type:String,default:''} ----------------------------------here }); 

在app.js中保存文件并运行命令节点app.js后,它会抛出一个错误如下,即使安装所有的软件包后,我运行该文件

 C:\leveltwo\assigntwo\blogModel.js:19 userName : {type:String,default:''} ^^^^^^^^ SyntaxError: Unexpected identifier at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) because of the above problem i am unable to create a new entries in the project and even my postman is also not responding. please reply if anyone knows ..... thank you.