koa-router
来源:6-4 第六天 实现关注自动回复提示
YOUNGFOREVER
2017-01-15
错误位置在 var Router = require('koa-router'); 怎么会在模块这里报错
\koa-router\node_modules\koa-compose\index.js:23
for (const fn of middleware) {
^^
SyntaxError: Unexpected identifier
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (node_modules\koa-router\lib\router.js:9:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (app.js:51:14)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
1回答
-
YOUNGFOREVER
提问者
2017-01-15
已解决。。好像是koa-router 框架问题。我把原代码里的复制到工程就好了。。
10
相似问题