1
C:\Users\Administrator\Documents\code\projects\weatherly>go get -u github.com/gofiber/fiber/v2 
cannot find package "github.com/gofiber/fiber/v2" in any of:
        c:\go\src\github.com\gofiber\fiber\v2 (from $GOROOT)
        C:\Users\Administrator\go\src\github.com\gofiber\fiber\v2 (from $GOPATH)

How do I download the package? I believe that it is trying to check what is cached on my computer and I don't know how to download it first.

  • 1
    *"I don't know how to download it first"* -- Try without `-u` and `-f`. – mkopriva Jan 25 '21 at 04:32
  • It is because of `/v2` tail. You should follow instructions and first run `go mod init` to properly initialize your project for use with modules. See https://github.com/gofiber/fiber#%EF%B8%8F-installation – blami Jan 25 '21 at 04:39

1 Answers1

1

Its because you haven't initiated your module, you should use go mod init YourModuleName, then its pretty simple to do. also remove -f from go get command.

TiGo
  • 652
  • 6
  • 11