iafan / goplayspace

Advanced Go Playground frontend written in Go, with syntax highlighting, turtle graphics mode, and more
https://goplay.space
Other
982 stars 61 forks source link

build-client is failing #6

Closed damienstanton closed 7 years ago

damienstanton commented 7 years ago

I am running Go 1.8.3 on macOS 10.12.5.

build-client returns the following error:

cannot find package "fmt" in any of:
    /usr/local/Cellar/go/1.8.1/libexec/src/fmt (from $GOROOT)
    /Users/damien/go/src/fmt (from $GOPATH)

build-server runs without issue.

iafan commented 7 years ago

This looks like some more generic GopherJS configuration issue. Note that while you mention Go 1.8.3, your $GOROOT seems to be pointing to some older 1.8.1 installation path. Go nowadays doesn't require $GOROOT to be set (and Mac installation uses /usr/local/go as the installation path, so this is why compiling the server might work without any issues), but this apparently somehow misleads GopherJS. You may want to try removing that environment variable definition and see if that helps.

damienstanton commented 7 years ago

Weird, I didn't even notice that. I think it must be something wrong with my GopherJS config, because I do not have an explicit $GOROOT set anywhere, and /usr/local/Cellar/go/ only contains my 1.8.3. Go installation (1.8.1 is not anywhere on my system).

damienstanton commented 7 years ago

Yep, my GopherJS installation was corrupted somehow and pointing to a nonexistent old version of Go.

Running go get -u github.com/gopherjs/gopherjs resolved this issue for me.