search

Home  >  Q&A  >  body text

node.js - 使用koa-view搭建项目app.use() requires a generator function错误

使用koa来做一个简单的web项目,自己的项目结构如下:

使用node --harmony app.js运行项目的时候,控制台报错

求大神指导那里有问题?

大家讲道理大家讲道理2873 days ago734

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-17 15:05:58

    Visual inspection is that koa-views does not support the function *(next) {} syntax,

    Because it returns function(ctx,next) method.

    Looking directly at the source code, there doesn’t seem to be much code. ^_^

    reply
    0
  • 黄舟

    黄舟2017-04-17 15:05:58

    . . . . . . Hen

    reply
    0
  • Cancelreply