{ "babel-core": "^6.24.1", "babel-plugin-syntax-async-functions": "^6.13.0", "babel-plugin-transform-async-to-generator": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1", "babel-polyfill": "^6.23.0", "babel-preset-es2015-node6": "^0.4.0", "babel-register": "^6.24.1" }
var babelrc = { "presets": ["node6"], "plugins": [ "transform-class-properties", "transform-async-to-generator" ] } require("babel-core/register")(babelrc); require("./app.js");
解決方案:https://github.com/koajs/bodyparser/tree/3.xnode
koa1使用 npm install koa-bodyparser@2
koa2使用 npm install koa-bodyparser@3git
解決方案:https://github.com/koajs/jwtgithub
koa1使用 npm install koa-jwt@1
koa2而且node< 7.6 使用 npm install koa-jwt@2.
koa2而且node>= 7.6 使用 npm install koa-jwt@3.npm