make build fails with `make: go-bindata-assetfs: Command not found`
tromlet opened this issue · comments
Describe the bug
Install fails after the make build
step with the following error message:
...
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/sass-loader/dist/cjs.js??ref--5-2!src/style.scss:
Entrypoint mini-css-extract-plugin = *
[0] ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--5-2!./src/style.scss 3.72 KiB {0} [built]
+ 1 hidden module
go get github.com/go-bindata/go-bindata/...
go get github.com/elazarl/go-bindata-assetfs/...
go-bindata-assetfs -prefix ui/dist ui/dist
make: go-bindata-assetfs: Command not found
make: *** [assets] Error 127
To Reproduce
Steps to reproduce the behavior:
- run
make build
ormake build-amd64
Expected behavior
I expected the build process to complete successfully, and then to resume the README guide past the make build
step.
Screenshots
n/a
Device:
- OS: CentOS 7
- Node.js v14.15.4
- go 1.15.7
- wg-ui 1.1.0
Did you add $HOME/go/bin
to your .bash_history and opened a new session?
Alternatively you could just export the new line in the current session.
Had this problem moments ago and thought it would be enough to add the global go path /usr/local/go/bin
.
Go downloads the go-bindata-assetfs to $HOME/go/bin
I did, as a matter of fact. Found that from another thread elsewhere on the net. I'm running as root, with $GOBIN
equal to /root/go/bin
. Still get that error. It doesn't seem like it fails to download... :/
I am pretty sure it's wrong or missing $GOPATH
or missing $GOPATH/bin
/$GOBIN
from $PATH
.
What's the output of this echo $PATH && echo $GOPATH
?
Oh that might be something. I don't know if $GOPATH
is set!
[root@server ~]# echo $PATH && echo $GOPATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin
[root@server ~]#
This issue is related to your system not finding go-bindata-assetfs binary based on your environment variables. I am not able to reproduce this on my systems.
I fixed it by adding $GOPATH
(or, in my case, following the Go setup instructions, $GOBIN
) to my $PATH
in ~/.bash_profile
.
# Add Go to PATH
export GOBIN=$HOME/go/bin
export PATH=$PATH:/usr/local/go/bin:$GOBIN