queckezz/koa-views

AssertionError: app.use() requires a generator function

uerbin opened this issue · 1 comments

npm install koa-views ,install koa-views version is 5.1.2

use with koa 1.x

assert.js:89
throw new assert.AssertionError({
^
AssertionError: app.use() requires a generator function
at Application.app.use (/Users/liwenwu/projects/yuanshuo_koa/node_modules/koa/lib/application.js:106:5)
at Object. (/Users/liwenwu/projects/yuanshuo_koa/app.js:34:5)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:134:18)
at node.js:962:3

when npm install koa-views@4.x

it's ok

koa-views@4.x -> koa@1
koa-views@5.x -> koa@2