Closed
Description
Running a sample socket code throws the following syscall issues:
package main
import "github.com/gofiber/fiber/v2"
func main() {
app := fiber.New()
app.Get("/get", func(c *fiber.Ctx) error {
return c.SendString("Hello from GET!")
})
app.Post("/post", func(c *fiber.Ctx) error {
return c.SendString("Hello from POST!")
})
_ = app.Listen(":3000")
}
Error:
../../../github.com/valyala/tcplisten@v1.0.0/socket_other.go:11:48: SOCK_NONBLOCK not declared by package syscall
../../../github.com/valyala/tcplisten@v1.0.0/socket_other.go:11:70: SOCK_CLOEXEC not declared by package syscall
GopherJS version:
GopherJS 1.18.0+go1.18.5
Build cmd:
GOOS=js GOARCH=ecmascript gopherjs build main.go