Fiber: ๐Ÿค— Difficulties during installation process

Created on 15 Oct 2020  ยท  9Comments  ยท  Source: gofiber/fiber

Hi all,
similarly to this issue I'm having difficulties to install fiber


logs

 francesco@francesco-yoga720 ๎‚ฐ ~ ๎‚ฐ go version            ๎‚ฒ โœ” ๎‚ฒ 4486 ๎‚ฒ 01:51:35 
go version go1.15.2 linux/amd64
 francesco@francesco-yoga720 ๎‚ฐ ~ ๎‚ฐ which go              ๎‚ฒ โœ” ๎‚ฒ 4487 ๎‚ฒ 01:51:39 
/home/francesco/development/go/go/bin/go
 francesco@francesco-yoga720 ๎‚ฐ ~ ๎‚ฐ go clean -cache -modcache -i -r      

 francesco@francesco-yoga720 ๎‚ฐ ~ ๎‚ฐ go get -u github.com/gofiber/fiber/v2

cannot find package "github.com/gofiber/fiber/v2" in any of:
    /home/francesco/development/go/go/src/github.com/gofiber/fiber/v2 (from $GOROOT)
    /home/francesco/development/go/golib/src/github.com/gofiber/fiber/v2 (from $GOPATH)
    /home/francesco/projects/go/src/github.com/gofiber/fiber/v2
 francesco@francesco-yoga720 ๎‚ฐ ~ ๎‚ฐ go get github.com/gofiber/fiber/v2   

cannot find package "github.com/gofiber/fiber/v2" in any of:
    /home/francesco/development/go/go/src/github.com/gofiber/fiber/v2 (from $GOROOT)
    /home/francesco/development/go/golib/src/github.com/gofiber/fiber/v2 (from $GOPATH)
    /home/francesco/projects/go/src/github.com/gofiber/fiber/v2
 francesco@francesco-yoga720 ๎‚ฐ ~ ๎‚ฐ                     ๎‚ฒ 1 โ†ต ๎‚ฒ 4491 ๎‚ฒ 01:52:08 


.zshrc

# GOLANG
export GOROOT=/home/francesco/development/go/go
export PATH=$GOROOT/bin:$PATH
# this is for downloaded library
export GOPATH=/home/francesco/development/go/golib
export PATH=$GOPATH/bin:$PATH
# this is for my projects
export GOPATH=$GOPATH:/home/francesco/projects/go

I've seen this answer, but I'm not sure what action should I take
I'm really new to go in general, I could use some help
Thank you

๐Ÿค” Question

Most helpful comment

Hi, have you ran go mod init [project-name] to initialize the module?

All 9 comments

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

Hi, have you ran go mod init [project-name] to initialize the module?

Hi, have you ran go mod init [project-name] to initialize the module?

This will create go.mod then you can ran go get -u github.com/gofiber/fiber/v2 that will create another file named go.sum if I am correct :)

Yes, you're correct

You can try go get -u github.com/gofiber/fiber-cli/fiber and run fiber new project-name [mod name] ๐Ÿ˜ƒ

fiber new creates some fiber boilerplate code and runs go mod init

@hi019 @alfuhigi
what is the correct location where to create go.mod?
GOPATH GOROOT or my app directory?

@kiyonlin

You can try go get -u gitHub.com/gofiber/fiber-cli/fiber and run fiber new project-name [mod name]

fiber new creates some fiber boilerplate code and runs go mod init

this doesn't work for me

go get -u gitHub.com/gofiber/fiber-cli/fiber
package gitHub.com/gofiber/fiber-cli/fiber: unrecognized import path "gitHub.com/gofiber/fiber-cli/fiber": reading https://gitHub.com/gofiber/fiber-cli/fiber?go-get=1: 404 Not Found

thanks for the help

can I suggest to update the installation in the readme.MD

this doesn't work for me

@iapicca Oops, I make a typo (gitHub)

can I suggest to update the installation in the readme.MD

Of course PRs are always welcome.

@kiyonlin now works thank you
I never heard about modules until now,
I'll go ahead and learn how to use it before bothering you any further
(google search pointed me here)

if fiber is as fast as your response time I feel that I've picked up the right framework to learn <3

I'm closing for now, I might submit the pr when I know what I'm doing
Thank you all

Was this page helpful?
0 / 5 - 0 ratings