Fiber version
v2
Issue description
I tried installing fiber with the g
import "github.com/gofiber/fiber/v2"
go get command and it is not working, go get -u or the go modules are also of no help.
Code snippet
package main
func main() {
app := fiber.New()
// Steps to reproduce
log.Fatal(app.Listen(":3000"))
}

Thanks for opening your first issue here! 馃帀 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
please try this
go clean -cache -modcache -i -r
article: https://lecstor.com/go-clear-cache/

it runs on my machine
Try to initiate a go.mod and run go mod tidy after you imported v2 in your project.


I had this problem with me.
What i did is remove the gofiber package or folders from the src and pkg folder.
Then check the go env. Set the GO111MODULE=on (My machine didn't set it automatically.)
Do not use the go get cause it will not work. Go to your project directory, then...

I had the
I had this problem with me.
What i did is remove the gofiber package or folders from the
srcandpkgfolder.Then check the
go env. Set theGO111MODULE=on(My machine didn't set it automatically.)Do not use the go get cause it will not work. Go to your project directory, then...
Actually I am totally a newbee in Golang and I didn't know that I should use go mod init ... before starting a new project, and after wasting couple of hours found the problem.
In ubuntu I just do this:
export GO111MODULE=on
go get github.com/gofiber/fiber/v2
before doing this, be sure that your .profile variables set like this:
open your profile:
sudo nano ~/.profile
if you put the golang to /usr/local/go
then edit the .profile like this:
export GOPATH=$HOME/work
export GOROOT=/usr/local/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
Same issue here. Good to know that @hzrp. Now its work. Why we shoud enable this tag for download the last version ? In a fresh Gitlab CI pipeline i have this issue
I had the same problem, than I have installed with the command go get -u github.com/gofiber/fiber on Ubuntu 20.04 and the version 2 was correctly installed. (no v2)
I had the same problem, than I have installed with the command go get -u github.com/gofiber/fiber on Ubuntu 20.04 and the version 2 was correctly installed. (no v2)
yes you right and i do it
In ubuntu I just do this:
export GO111MODULE=on
go get github.com/gofiber/fiber/v2before doing this, be sure that your .profile variables set like this:
open your profile:
sudo nano ~/.profile
if you put the golang to /usr/local/go
then edit the .profile like this:export GOPATH=$HOME/work export GOROOT=/usr/local/go export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
No sudo needed about a file in your home directory.
Most helpful comment
I had the same problem, than I have installed with the command go get -u github.com/gofiber/fiber on Ubuntu 20.04 and the version 2 was correctly installed. (no v2)