Open cgimenez opened 3 years ago
Ok, got it. I didn't noticed that my go.mod was targeting an old version of Oto.
Fixing it to require github.com/hajimehoshi/oto v0.6.1
What I don't get is that I followed the procedure described here : https://github.com/faiface/beep/wiki/Hello,-Beep!
when go run complained, I go got github.com/hajimehoshi/oto and ended with an old version of Oto.
Go modules dependencies are still obscure to me ;-)
This should be fixed now.
Hi ! I've been toying a little with Beep under Mac OS with success. Great lib !
Then I tried to compile my little hello world for wasm with
GOOS=js GOARCH=wasm go build -o tstbeep
and I got these errors
Most, if not all, of these functions have been deprecated for a while.
At first I thought it could be a problem related with Oto, so I compiled https://github.com/hajimehoshi/oto/blob/master/example/main.go to wasm and go it working (at least for Firefox, Chrome is more restrictive but that's not the point)
My tstbeep go.mod is simple as
I really don't see where gopherjs comes into the dance. Oto doesn't seems to use it, neither Beep...
So, because I had installed (and never used) gopherjs :
rm -rf gopherjs ~/go/bin directory
andrm -rf gopherjs ~/go/pkg/mod/github.com/gopherjs
And issuing a
GOOS=js GOARCH=wasm go build -o tstbeep
resurrected ~/go/pkg/mod/github.com/gopherjs
Any clue ?