Make build fails
Describe the bug
A clear and concise description of what the bug is.
cloned repo - followed documentation installed all pre-requisite
when I run make build command below is the output
akhil@Akhil-S:~/startup/incubator-answer$ make build
wire: github.com/apache/incubator-answer/cmd: wrote /home/akhil/startup/incubator-answer/cmd/wire_gen.go
internal/service/siteinfo_common/siteinfo_service.go:33: running "mockgen": exec: "mockgen": executable file not found in $PATH
make: *** [Makefile:28: generate] Error 1
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots or video to help explain your problem.
Platform
Not UI / app related issue. build related issue. using WSL - ubuntu
- Device: [e.g. Desktop, Mobile]
- OS: [e.g. macOS]
- Browser and version: [e.g. Chrome, Safari]
- Version: [e.g. v1.2.0]
Is this supposed to run only from docker container?
another reason being in docker build file we use /data/ from source container in0order to make this run.
refer to docker build file COPY --from=golang-builder /data /data
It looks like it's caused by mockgen not having to be installed successfully. Try using the make generate command to install it. Alternatively, you can use go install github.com/golang/mock/[email protected]
i had this same issue.
you also need to add /home/<your_username>/go/bin to your path this is where go keeps all the installed binaries you can find the mockgen binary there
i think you only added the path where go was installed.