dennwc / dom

DOM library for Go and WASM
Apache License 2.0
486 stars 59 forks source link

error when following instructions in README #12

Closed jeffwillette closed 5 years ago

jeffwillette commented 5 years ago

I followed the instructions in the readme and I got this error(?)

element.go:6:2: build constraints exclude all Go files in /usr/local/Cellar/go/1.11.4/libexec/src/syscall/js

when running go get -u github.com/dennwc/dom

this is my first attempt at playing with wasm so IDK if something in my environment is off. does GOOS or GOARCH need to be set for any of these commands?

dennwc commented 5 years ago

It's actually safe to ignore this error. It only mentions that there is some file in the library that references syscall/js that is not available on your GOOS (since it's not JS). Everything should work fine when compiling to WASM. I'll leave this open to check that all files include the wasm,js build tag.

g5becks commented 5 years ago

I can't even go get the library without changing the environment variables.

go get -u github.com/dennwc/dom ../go/src/github.com/dennwc/dom/element.go:5:2: build constraints exclude all Go files in /usr/local/Cellar/go/1.11.5/libexec/src/syscall/js

jjjabc commented 5 years ago

GOARCH=wasm GOOS=js go get -u github.com/dennwc/dom