慕斯4181173
2020-07-13 09:38
2020-07-13 09:20:58,337 ERROR 13700 --- [DESKTOP-154SCG5] - nodejs.TypeError: validator_1.default[this.validateFunction] is not a function
at Rule.validate (C:\Users\YZ\Desktop\vue\lin\lin-cms-koa\node_modules\lin-mizar\lin\validator\lin-validator.js:339:70)
at AddContentValidator.checkRules (C:\Users\YZ\Desktop\vue\lin\lin-cms-koa\node_modules\lin-mizar\lin\validator\lin-validator.js:166:46)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at AddContentValidator.validate (C:\Users\YZ\Desktop\vue\lin\lin-cms-koa\node_modules\lin-mizar\lin\validator\lin-validator.js:44:15)
at C:\Users\YZ\Desktop\vue\lin\lin-cms-koa\app\api\v1\/content.js:9:12
at exports.log (C:\Users\YZ\Desktop\vue\lin\lin-cms-koa\node_modules\lin-mizar\lin\middleware\log.js:15:9)
at C:\Users\YZ\Desktop\vue\lin\lin-cms-koa\node_modules\koa-mount\index.js:52:26
at bodyParser (C:\Users\YZ\Desktop\vue\lin\lin-cms-koa\node_modules\koa-bodyparser\index.js:95:5)
pid: 13700
hostname: DESKTOP-154SCG
SyntaxError,语法错误。你这里可能是又把智能感知当代码写了。。?
看提示像是AddContentValidator类定义有问题,是不是忘记导出类了。
是的。老师在model下的模型js中运行时 遇到了这样的错误 总是提示:的警告 这是什么原因呢
attributes:{
^
(node:12516) UnhandledPromiseRejectionWarning: SyntaxError: C:\Users\YZ\Desktop\vue\lin\lin-cms-koa\app\model\movie.js: Unexpected token, expected "," (43:9)
41 | },
42 | },
> 43 | options:{
| ^
44 | tableName: 'movie',
45 | modelName: 'movie',
46 | paranoid: true,
0到1快速构建自己的后台管理系统
21499 学习 · 145 问题
相似问题