单独跑server端插件依赖报错
danielmlc opened this issue · comments
node版本 6.10.2
npm版本 3.10.10
`> @ start E:\实验室\Vuejs\blog\server
node entry.js
E:\实验室\Vuejs\blog\server\node_modules\koa-ratelimit\index.js:40
return async function ratelimit(ctx, next) {
^^^^^^^^
SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Module._extensions..js (module.js:579:10)
at Object.require.extensions.(anonymous function) [as .js] (E:\实验室\Vuejs\blog\server\node_modules\babel-register\lib\node.js
52:7)`
已解决,谢谢反馈,错误是ratelimit这个包默认采用的node v7.6的写法而转码器没有转码到。重新拉一下代码就可以了
Ok