Coder Social home page Coder Social logo

运行报错了 about gracejs HOT 3 CLOSED

xiongwilee avatar xiongwilee commented on August 26, 2024
运行报错了

from gracejs.

Comments (3)

xiongwilee avatar xiongwilee commented on August 26, 2024

node 版本是 v7.6.0+ 吗?

from gracejs.

kangning1206 avatar kangning1206 commented on August 26, 2024

我的node版本v6.10.3;

knbdeMacBook-Pro:koa-grace knb$ npm run dev

> gracejs@2.0.10 dev /Users/knb/workspace/github/koa-grace
> nodemon bin/server.js

[nodemon] 1.11.0
[nodemon] reading config /Users/knb/workspace/github/koa-grace/nodemon.json
[nodemon] to restart at any time, enter `rs`
[nodemon] ignoring: /Users/knb/workspace/github/koa-grace/.git/**/* .nyc_output .sass-cache bower_components coverage /Users/knb/workspace/github/koa-grace/node_modules/**/* /Users/knb/workspace/github/koa-grace/.git/**/* node_modules/**/node_modules
[nodemon] watching: app/*/controller/**/* app/*/model/**/* app/*/mock/**/*
[nodemon] watching extensions: js,json
[nodemon] starting `node bin/server.js`
[nodemon] child pid: 6148
[nodemon] watching 342 files
/Users/knb/workspace/github/koa-grace/middleware/body/index.js:51
  return async function body(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 Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at fs.readdirSync.forEach (/Users/knb/workspace/github/koa-grace/middleware/index.js:9:21)
    at Array.forEach (native)
    at Object.<anonymous> (/Users/knb/workspace/github/koa-grace/middleware/index.js:6:25)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
[nodemon] app crashed - waiting for file changes before starting...

运行环境readme 应该说明下,即使没测试哪些环境运行,至少将自己的环境贴出来,跑不起来;

from gracejs.

xiongwilee avatar xiongwilee commented on August 26, 2024

注意:请确保你的运行环境中Nodejs的版本至少是v7.6.0 (或者你也可以考虑支持 Nodejs v4.x+ 的koa-grace v1.x)

快速开始的第一行有注明

from gracejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.