revel: Cannot run a new revel application
Created a new revel application following the tutorial from the website.
successfully managed to run revel new -a myapp
but when I do revel run -a myapp I get the following errors
Revel executing: run a Revel application
ERROR 22:16:07 revel_container.go:214: Failed to load module. Import of path failed modulePath=github.com/revel/modules/static error="cannot find package \"github.com/revel/modules/static\" in any of:\n\t/usr/local/go/src/github.com/revel/modules/static (from $GOROOT)\n\t/home/spokzers/go_workspace/src/github.com/revel/modules/static (from $GOPATH)"
ERROR 22:16:07 revel_container.go:214: Failed to load module. Import of path failed modulePath=github.com/revel/modules/testrunner error="cannot find package \"github.com/revel/modules/testrunner\" in any of:\n\t/usr/local/go/src/github.com/revel/modules/testrunner (from $GOROOT)\n\t/home/spokzers/go_workspace/src/github.com/revel/modules/testrunner (from $GOPATH)"
WARN 22:16:07 harness.go:175: No http.addr specified in the app.conf listening on localhost interface only. This will not allow external access to your application
ERROR 22:16:08 revel module.go:163: Failed to load module. Import of path failed section=module modulePath=github.com/revel/modules/static error="cannot find package \"github.com/revel/modules/static\" in any of:\n\t/usr/local/go/src/github.com/revel/modules/static (from $GOROOT)\n\t/home/spokzers/go_workspace/src/github.com/revel/modules/static (from $GOPATH)"
ERROR 22:16:08 revel module.go:163: Failed to load module. Import of path failed section=module modulePath=github.com/revel/modules/testrunner error="cannot find package \"github.com/revel/modules/testrunner\" in any of:\n\t/usr/local/go/src/github.com/revel/modules/testrunner (from $GOROOT)\n\t/home/spokzers/go_workspace/src/github.com/revel/modules/testrunner (from $GOPATH)"
INFO 22:16:08 app run.go:29: Running revel server
CRIT 22:16:08 revel logger.go:195: NewRoute: Failed to find controller for route path action /public/*filepath?Static.Serve
map[string]*revel.ActionPathData{"app.index":(*revel.ActionPathData)(0xc000248850), "app\\app.index":(*revel.ActionPathData)(0xc000248850)}
section=router
CRIT 22:16:08 revel server.go:66: Recovered error in startup error="NewRoute: Failed to find controller for route path action /public/*filepath?Static.Serve \nmap[string]*revel.ActionPathData{\"app.index\":(*revel.ActionPathData)(0xc000248850), \"app\\\\app.index\":(*revel.ActionPathData)(0xc000248850)}\n"
panic: NewRoute: Failed to find controller for route path action /public/*filepath?Static.Serve
map[string]*revel.ActionPathData{"app.index":(*revel.ActionPathData)(0xc000248850), "app\\app.index":(*revel.ActionPathData)(0xc000248850)}
[recovered]
panic: Fatal error in startup
goroutine 1 [running]:
github.com/revel/revel.Run.func1()
/home/spokzers/go_workspace/src/github.com/revel/revel/server.go:68 +0x151
panic(0x847020, 0xc00020bf90)
/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/revel/revel/logger.(*RevelLogger).Panic(0xc00008d020, 0xc00024c0f0, 0xe6, 0x0, 0x0, 0x0)
/home/spokzers/go_workspace/src/github.com/revel/revel/logger/logger.go:207 +0xaf
github.com/revel/revel/logger.(*RevelLogger).Panicf(0xc00008d020, 0x90e487, 0x42, 0xc0002860e0, 0x2, 0x2)
/home/spokzers/go_workspace/src/github.com/revel/revel/logger/logger.go:195 +0x8a
github.com/revel/revel.NewRoute(0xc8d640, 0xc000270152, 0x3, 0xc00027015a, 0x11, 0xc000270182, 0xc, 0xc00027018f, 0x8, 0xc000099e40, ...)
/home/spokzers/go_workspace/src/github.com/revel/revel/router.go:145 +0xd8d
github.com/revel/revel.parseRoutes(0xc8d640, 0xc000099e40, 0x31, 0x0, 0x0, 0xc000270000, 0x34e, 0x1, 0x0, 0x0, ...)
/home/spokzers/go_workspace/src/github.com/revel/revel/router.go:490 +0x3fe
github.com/revel/revel.parseRoutesFile(0xc8d640, 0xc000099e40, 0x31, 0x0, 0x0, 0xc0001c1d01, 0x40db38, 0x40, 0x8b1460, 0x8cfb01)
/home/spokzers/go_workspace/src/github.com/revel/revel/router.go:436 +0x1a3
github.com/revel/revel.(*Router).Refresh(0xc00025d000, 0xc00025d000)
/home/spokzers/go_workspace/src/github.com/revel/revel/router.go:250 +0x6a
github.com/revel/revel.init.5.func1()
/home/spokzers/go_workspace/src/github.com/revel/revel/router.go:836 +0x139
github.com/revel/revel.runStartupHooks()
/home/spokzers/go_workspace/src/github.com/revel/revel/server.go:131 +0x96
github.com/revel/revel.InitServer()
/home/spokzers/go_workspace/src/github.com/revel/revel/server.go:37 +0x2e
github.com/revel/revel.Run(0xa39f)
/home/spokzers/go_workspace/src/github.com/revel/revel/server.go:74 +0xe0
myapp/app/tmp/run.Run(0xa39f)
/home/spokzers/go_workspace/src/myapp/app/tmp/run/run.go:24 +0x30
main.main()
/home/spokzers/go_workspace/src/myapp/app/tmp/main.go:24 +0x81
ERROR 22:16:08 harness.go:231: Could not start application error="revel/harness: app died reason: exit status 2"
what could be the problem ? TIA
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (3 by maintainers)
I am not sure how solid is the framework when the given instructions does not work.
That error is expected - when you fetch the modules repo by itself - but it is an issue with the revel/cmd that it doesn’t auto-fetch the revel/modules package now. Ill leave this open until that is fixed.
You may also need to do a
go get -u github.com/revel/revel