revel: I am creating a revel project and I cannot get it to work.

I have installed Go guiding myself with the Go webpage tutorial, I installed with ease. However when I tried to install this framework I got stopped here:

`userx:~$ go version go version go1.16 linux/amd64

userx:~$ cd $GOPATH

userx:~/go$ revel new -a myapp Revel executing: create a skeleton Revel application Your application has been created in: /home/userx/go/myapp

You can run it with: revel run -a myapp

userx:~/go$ revel run -a myapp ERROR 11:42:32 file.go:372: Error seeking=github.com/revel/revel count=1 App Import Path=github.com/revel/revel filesystem path=github.com/revel/revel errors=“[-: no required module provides package github.com/revel/revel; to add it:\n\tgo get github.com/revel/revel]” Downloading related packages … completed. Revel executing: run a Revel application Downloading related packages … completed. ERROR 11:42:37 revel.go:107: Unable to execute error=“Revel paths[error Failed to load module. Import of path failed modulePath:github.com/revel/modules/static error:No files found in import path github.com/revel/modules/static ]”`

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

In go 1.16 the go.mod is more actively looking at the source code and not simply relying on the packages defined in go.mod. So it looks to see if a reference to github.com/revel/modules is in the code and if not it removes it from the go.mod. The fix is short and sweet. Add a reference to the module in the init.go, similar to what is needed for databases. I fixed the skeleton project so it should now just work when creating a new project revel/skeletons@61f1ea7

I’m still having issues:

perry@LIVBOX:/mnt/c/Projects/WSL/perry-express-website$ export GOPATH=$(pwd)
perry@LIVBOX:/mnt/c/Projects/WSL/perry-express-website$ revel new -a website
Revel executing: create a skeleton Revel application
Your application has been created in:
   /mnt/c/Projects/WSL/perry-express-website/website

You can run it with:
   revel run -a  website
perry@LIVBOX:/mnt/c/Projects/WSL/perry-express-website$
perry@LIVBOX:/mnt/c/Projects/WSL/perry-express-website$ revel run -a  website
ERROR 17:17:35   file.go:372: Error                                    errors="[-: no required module provides package github.com/revel/revel; to add it:\n\tgo get github.com/revel/revel]"  seeking=github.com/revel/revel count=1 App Import Path=github.com/revel/revel filesystem path=github.com/revel/revel
Downloading related packages ... completed.









Revel executing: run a Revel application
WARN  17:17:50 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
Changed detected, recompiling
Parsing packages, (may require download if not cached)... Completed
/mnt/c/Projects/WSL/perry-express-website/src/website/home/perry/go/pkg/mod/github.com/revel/revel@v1.0.0/cache/memcached.go
WARN  17:17:55  build.go:420: Could not find in GO path                file=/home/perry/go/pkg/mod/github.com/revel/revel@v1.0.0/cache/memcached.go
ERROR 17:17:55 harness.go:239: Build detected an error                  error="Go Compilation Error (in /home/perry/go/pkg/mod/github.com/revel/revel@v1.0.0/cache/memcached.go:11): no required module provides package github.com/bradfitz/gomemcache/memcache; to add it:"

Error compiling code, to view error details see proxy running on http://:9000


Time to recompile 5.1342788s

Looks like cd’ing into the directory after it fails and running go mod tidy fixes it.

Hello! Totally new to both Revel and go, but I just hit all of this stuff with a fresh installation. Is there a way to re-open this ticket, or is there a newer ticket I could follow? FWIW, @alexgeek’s go mod tidy comment above solved the problem for me.

(Thank you to everyone who’s contributed to Revel and to this thread. It was very helpful.)

+1 the command go mod tidy seems to be working , post installation of all go dependencies . Thanks @alexgeek for the helpful tip .

Thanks, @meagar your comment helped. Also, I had to get memcache.

go get github.com/revel/modules/static
go get github.com/garyburd/redigo/redis
go get github.com/patrickmn/go-cache
go get github.com/bradfitz/gomemcache/memcache

+1 the command go mod tidy seems to be working , post installation of all go dependencies . Thanks @alexgeek for the helpful tip .

+1,go mod tidy, help me

Sounds good, im going to reopen this ticket to track the progress on the go1.16 BTW did you know Revel supports the fasthttp engine? See this. The core packages allow substituting custom engine connectors using this interface