goroutine 58 [running]:
net/http.(*conn).serve.func1(0xc04239ea00)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1491 +0x131
panic(0x843fa0, 0xc04200e050)
        /usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:458 +0x251
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.sort(0xc0423807e0, 0xc042380860, 0x1, 0x1, 0xc042380820, 0x0, 0xb4d940)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:177 +0x23c
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.OrderBy.func1(0x86a0e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:28 +0x94
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.Results(0xc042380820, 0x953b98, 0xc042380820, 0xc0423807e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/result.go:208 +0x35
github.com/leancloud/lean-cli/lean/console.(*Server).classesHandler(0xc042040780, 0xb24060, 0xc0423b05b0, 0xc042168780)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:132 +0x248
github.com/leancloud/lean-cli/lean/console.(*Server).(github.com/leancloud/lean-cli/lean/console.classesHandler)-fm(0xb24060, 0xc0423b05b0, 0xc042168780)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:188 +0x4f
net/http.HandlerFunc.ServeHTTP(0xc0423668b0, 0xb24060, 0xc0423b05b0, 0xc042168780)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1726 +0x4b
github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc04231a0a0, 0xb24060, 0xc0423b05b0, 0xc042168780)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux/mux.go:103 +0x25c
net/http.serverHandler.ServeHTTP(0xc04239e800, 0xb24060, 0xc0423b05b0, 0xc042168780)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2202 +0x84
net/http.(*conn).serve(0xc04239ea00, 0xb249a0, 0xc0421f5300)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1579 +0x4be
created by net/http.(*Server).Serve
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2293 +0x454
http: panic serving 127.0.0.1:6161: runtime error: index out of range
goroutine 24 [running]:
net/http.(*conn).serve.func1(0xc042273d80)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1491 +0x131
panic(0x843fa0, 0xc04200e050)
        /usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:458 +0x251
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.sort(0xc042380b00, 0xc042380b80, 0x1, 0x1, 0xc042380b60, 0x0, 0xc0423e8800)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:177 +0x23c
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.OrderBy.func1(0x86a0e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:28 +0x94
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.Results(0xc042380b60, 0x953b98, 0xc042380b60, 0xc042380b00)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/result.go:208 +0x35
github.com/leancloud/lean-cli/lean/console.(*Server).classesHandler(0xc042040780, 0xb24060, 0xc04204ef70, 0xc0424ae5a0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:132 +0x248
github.com/leancloud/lean-cli/lean/console.(*Server).(github.com/leancloud/lean-cli/lean/console.classesHandler)-fm(0xb24060, 0xc04204ef70, 0xc0424ae5a0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:188 +0x4f
net/http.HandlerFunc.ServeHTTP(0xc0423668b0, 0xb24060, 0xc04204ef70, 0xc0424ae5a0)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1726 +0x4b
github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc04231a0a0, 0xb24060, 0xc04204ef70, 0xc0424ae5a0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux/mux.go:103 +0x25c
net/http.serverHandler.ServeHTTP(0xc04239e800, 0xb24060, 0xc04204ef70, 0xc0424ae5a0)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2202 +0x84
net/http.(*conn).serve(0xc042273d80, 0xb249a0, 0xc04237c9c0)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1579 +0x4be
created by net/http.(*Server).Serve
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2293 +0x454
http: panic serving 127.0.0.1:6163: runtime error: index out of range
goroutine 25 [running]:
net/http.(*conn).serve.func1(0xc042273e00)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1491 +0x131
panic(0x843fa0, 0xc04200e050)
        /usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:458 +0x251
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.sort(0xc042380e40, 0xc042380ec0, 0x1, 0x1, 0xc042380ea0, 0x0, 0xc042002800)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:177 +0x23c
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.OrderBy.func1(0x86a0e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:28 +0x94
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.Results(0xc042380ea0, 0x953b98, 0xc042380ea0, 0xc042380e40)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/result.go:208 +0x35
github.com/leancloud/lean-cli/lean/console.(*Server).classesHandler(0xc042040780, 0xb24060, 0xc04204f110, 0xc0424ae1e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:132 +0x248
github.com/leancloud/lean-cli/lean/console.(*Server).(github.com/leancloud/lean-cli/lean/console.classesHandler)-fm(0xb24060, 0xc04204f110, 0xc0424ae1e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:188 +0x4f
net/http.HandlerFunc.ServeHTTP(0xc0423668b0, 0xb24060, 0xc04204f110, 0xc0424ae1e0)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1726 +0x4b
github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc04231a0a0, 0xb24060, 0xc04204f110, 0xc0424ae1e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux/mux.go:103 +0x25c
net/http.serverHandler.ServeHTTP(0xc04239e800, 0xb24060, 0xc04204f110, 0xc0424ae1e0)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2202 +0x84
net/http.(*conn).serve(0xc042273e00, 0xb249a0, 0xc04237cb40)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1579 +0x4be
created by net/http.(*Server).Serve
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2293 +0x454
http: panic serving 127.0.0.1:6164: runtime error: index out of range
goroutine 26 [running]:
net/http.(*conn).serve.func1(0xc042273e80)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1491 +0x131
panic(0x843fa0, 0xc04200e050)
        /usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:458 +0x251
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.sort(0xc042381180, 0xc042381200, 0x1, 0x1, 0xc0423811e0, 0x0, 0xb4d940)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:177 +0x23c
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.OrderBy.func1(0x86a0e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:28 +0x94
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.Results(0xc0423811e0, 0x953b98, 0xc0423811e0, 0xc042381180)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/result.go:208 +0x35
github.com/leancloud/lean-cli/lean/console.(*Server).classesHandler(0xc042040780, 0xb24060, 0xc04204f1e0, 0xc0424ae2d0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:132 +0x248
github.com/leancloud/lean-cli/lean/console.(*Server).(github.com/leancloud/lean-cli/lean/console.classesHandler)-fm(0xb24060, 0xc04204f1e0, 0xc0424ae2d0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:188 +0x4f
net/http.HandlerFunc.ServeHTTP(0xc0423668b0, 0xb24060, 0xc04204f1e0, 0xc0424ae2d0)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1726 +0x4b
github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc04231a0a0, 0xb24060, 0xc04204f1e0, 0xc0424ae2d0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux/mux.go:103 +0x25c
net/http.serverHandler.ServeHTTP(0xc04239e800, 0xb24060, 0xc04204f1e0, 0xc0424ae2d0)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2202 +0x84
net/http.(*conn).serve(0xc042273e80, 0xb249a0, 0xc04237cc40)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1579 +0x4be
created by net/http.(*Server).Serve
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2293 +0x454
http: panic serving 127.0.0.1:6165: runtime error: index out of range
goroutine 59 [running]:
net/http.(*conn).serve.func1(0xc04239ea80)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1491 +0x131
panic(0x843fa0, 0xc04200e050)
        /usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:458 +0x251
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.sort(0xc0423814e0, 0xc042381560, 0x1, 0x1, 0xc042381540, 0x0, 0xc0423e8400)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:177 +0x23c
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.OrderBy.func1(0x86a0e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:28 +0x94
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.Results(0xc042381540, 0x953b98, 0xc042381540, 0xc0423814e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/result.go:208 +0x35
github.com/leancloud/lean-cli/lean/console.(*Server).classesHandler(0xc042040780, 0xb24060, 0xc04204f2b0, 0xc042168870)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:132 +0x248
github.com/leancloud/lean-cli/lean/console.(*Server).(github.com/leancloud/lean-cli/lean/console.classesHandler)-fm(0xb24060, 0xc04204f2b0, 0xc042168870)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:188 +0x4f
net/http.HandlerFunc.ServeHTTP(0xc0423668b0, 0xb24060, 0xc04204f2b0, 0xc042168870)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1726 +0x4b
github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc04231a0a0, 0xb24060, 0xc04204f2b0, 0xc042168870)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux/mux.go:103 +0x25c
net/http.serverHandler.ServeHTTP(0xc04239e800, 0xb24060, 0xc04204f2b0, 0xc042168870)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2202 +0x84
net/http.(*conn).serve(0xc04239ea80, 0xb249a0, 0xc0421f5380)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1579 +0x4be
created by net/http.(*Server).Serve
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2293 +0x454
http: panic serving 127.0.0.1:6170: runtime error: index out of range
goroutine 60 [running]:
net/http.(*conn).serve.func1(0xc04239eb00)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1491 +0x131
panic(0x843fa0, 0xc04200e050)
        /usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:458 +0x251
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.sort(0xc042381800, 0xc042381880, 0x1, 0x1, 0xc042381860, 0x0, 0xc042002800)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:177 +0x23c
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.OrderBy.func1(0x86a0e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:28 +0x94
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.Results(0xc042381860, 0x953b98, 0xc042381860, 0xc042381800)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/result.go:208 +0x35
github.com/leancloud/lean-cli/lean/console.(*Server).classesHandler(0xc042040780, 0xb24060, 0xc04204f380, 0xc0420e4c30)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:132 +0x248
github.com/leancloud/lean-cli/lean/console.(*Server).(github.com/leancloud/lean-cli/lean/console.classesHandler)-fm(0xb24060, 0xc04204f380, 0xc0420e4c30)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:188 +0x4f
net/http.HandlerFunc.ServeHTTP(0xc0423668b0, 0xb24060, 0xc04204f380, 0xc0420e4c30)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1726 +0x4b
github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc04231a0a0, 0xb24060, 0xc04204f380, 0xc0420e4c30)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux/mux.go:103 +0x25c
net/http.serverHandler.ServeHTTP(0xc04239e800, 0xb24060, 0xc04204f380, 0xc0420e4c30)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2202 +0x84
net/http.(*conn).serve(0xc04239eb00, 0xb249a0, 0xc042281380)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1579 +0x4be
created by net/http.(*Server).Serve
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2293 +0x454
http: panic serving 127.0.0.1:6184: runtime error: index out of range
goroutine 36 [running]:
net/http.(*conn).serve.func1(0xc042409500)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1491 +0x131
panic(0x843fa0, 0xc04200e050)
        /usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:458 +0x251
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.sort(0xc04234e060, 0xc04234e0e0, 0x1, 0x1, 0xc04234e0c0, 0x0, 0xb4d940)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:177 +0x23c
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.OrderBy.func1(0x86a0e0)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/orderby.go:28 +0x94
github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq.Query.Results(0xc04234e0c0, 0x953b98, 0xc04234e0c0, 0xc04234e060)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/ahmetalpbalkan/go-linq/result.go:208 +0x35
github.com/leancloud/lean-cli/lean/console.(*Server).classesHandler(0xc042040780, 0xb24060, 0xc04204f450, 0xc0424ae690)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:132 +0x248
github.com/leancloud/lean-cli/lean/console.(*Server).(github.com/leancloud/lean-cli/lean/console.classesHandler)-fm(0xb24060, 0xc04204f450, 0xc0424ae690)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/console/server.go:188 +0x4f
net/http.HandlerFunc.ServeHTTP(0xc0423668b0, 0xb24060, 0xc04204f450, 0xc0424ae690)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1726 +0x4b
github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc04231a0a0, 0xb24060, 0xc04204f450, 0xc0424ae690)
        /Users/asaka/Codes/go/src/github.com/leancloud/lean-cli/lean/vendor/github.com/gorilla/mux/mux.go:103 +0x25c
net/http.serverHandler.ServeHTTP(0xc04239e800, 0xb24060, 0xc04204f450, 0xc0424ae690)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2202 +0x84
net/http.(*conn).serve(0xc042409500, 0xb249a0, 0xc04237dd40)
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:1579 +0x4be
created by net/http.(*Server).Serve
        /usr/local/Cellar/go/1.7.3/libexec/src/net/http/server.go:2293 +0x454

您好,能否确认一下命令行工具版本号(使用 lean -v 可以看到),如果不是最新的 0.5.2 的话麻烦升级一下。

就是最新的0.5.2

Bestony@Windows ~/Desktop
$ lean

 _                        ______ _                 _
| |                      / _____) |               | |
| |      ____ ____ ____ | /     | | ___  _   _  _ | |
| |     / _  ) _  |  _ \| |     | |/ _ \| | | |/ || |
| |____( (/ ( ( | | | | | \_____| | |_| | |_| ( (_| |
|_______)____)_||_|_| |_|\______)_|\___/ \____|\____|
NAME:
   lean - Command line to manage and deploy LeanCloud apps

USAGE:
   lean.exe [global options] command [command options] [arguments...]

VERSION:
   0.5.2

不好意思,发现是引入的一个库 (go-linq) 升级之后的 bug 导致的问题,现在是在没有云函数 / hook 的情况下就会报这个错误。

我尽快发布新的版本来解决这个问题,在发布之前,如果您的代码里现在没有任何 hook,推荐创建一个来临时绕过这个问题,例如 node 的项目,在 cloud.js 里添加下面代码:

AV.Cloud.beforeSave('ANeverusedClassName', function(req, res) {
    res.success();
});