Node.js 我在Orientrom做错了什么?
我正在使用从github()下载的模块orientorm 我还在第23行后面的./lib/index.js中添加了几行代码Node.js 我在Orientrom做错了什么?,node.js,mongoose,orientdb,Node.js,Mongoose,Orientdb,我正在使用从github()下载的模块orientorm 我还在第23行后面的./lib/index.js中添加了几行代码 this.Scehma = require('./dbSchema'); this.Model = require('./model'); this.Query = require('./query'); 这样我就可以使用其他模块了。我在谷歌上搜索帮助。但是我找不到任何关于你的模块的内容 这是我的密码 orientorm = require('orientorm'), o
this.Scehma = require('./dbSchema');
this.Model = require('./model');
this.Query = require('./query');
这样我就可以使用其他模块了。我在谷歌上搜索帮助。但是我找不到任何关于你的模块的内容
这是我的密码
orientorm = require('orientorm'),
orntSchema = orientorm.Scehma;
var UserScehma = new orntSchema({
created: {
type: Date,
default: Date.now
},
title: {
type: String,
required: true,
trim: true
},
content: {
type: String,
required: true,
trim: true
},
user: {
type: orntSchema.Types.Link,
ref: 'User'
}
});
orientorm.Model('UserScehma', UserScehma);
但是我犯了这个错误
.\lib\model\
this.$__.strictMode = schema.builtOpts && schema.builtOpts.strict;
^
TypeError: Cannot read property 'builtOpts' of undefined
at Orientorm.Doc (D:\orientrom_app_prec_1\node_modules\orientorm\lib\model\Document.js:35:33)
at Orientorm.Model (D:\orientrom_app_prec_1\node_modules\orientorm\lib\model\index.js:13:7)
at Object.<anonymous> (D:\orientrom_app_prec_1\app.js:27:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
\lib\model\
此.$\uuu0.strictMode=schema.builtOpts&&schema.builtOpts.strict;
^
TypeError:无法读取未定义的属性“BuiltPts”
在Orientorm.Doc(D:\orientrom\u app\u prec\u 1\node\u modules\Orientorm\lib\model\Document.js:35:33)
模型(D:\orientrom\u app\u prec\u 1\node\u modules\Orientorm\lib\Model\index.js:13:7)
反对。(D:\orientrom\u app\u prec\u 1\app.js:27:11)
在模块处编译(Module.js:456:26)
在Object.Module.\u extensions..js(Module.js:474:10)
在Module.load(Module.js:356:32)
在Function.Module.\u加载(Module.js:312:12)
位于Function.Module.runMain(Module.js:497:10)
启动时(node.js:119:16)
在node.js:906:3
Scehma
应该是Schema
。谢谢Ocaso Protal!但还是同样的错误。