Closed ureuerae closed 4 years ago
root@naiveproxy-caddy2:~# ~/go/bin/xcaddy build --with github.com/caddyserver/forwardproxy=./forwardproxy 2020/07/18 04:08:06 [INFO] Temporary folder: /tmp/buildenv_2020-07-18-0408.627660925 2020/07/18 04:08:06 [INFO] Writing main module: /tmp/buildenv_2020-07-18-0408.627660925/main.go 2020/07/18 04:08:06 [INFO] Initializing Go module 2020/07/18 04:08:06 [INFO] exec (timeout=10s): /usr/bin/go mod init caddy go: creating new go.mod: module caddy 2020/07/18 04:08:06 [INFO] Replace github.com/caddyserver/forwardproxy => ./forwardproxy 2020/07/18 04:08:06 [INFO] exec (timeout=10s): /usr/bin/go mod edit -replace github.com/caddyserver/forwardproxy=./forwardproxy 2020/07/18 04:08:06 [INFO] Pinning versions 2020/07/18 04:08:06 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/caddyserver/caddy/v2 2020/07/18 04:08:07 [INFO] Build environment ready 2020/07/18 04:08:07 [INFO] Building Caddy 2020/07/18 04:08:07 [INFO] exec (timeout=0s): /usr/bin/go build -o /root/caddy -ldflags -w -s -trimpath go: finding github.com/caddyserver/forwardproxy latest build caddy: cannot load github.com/caddyserver/forwardproxy: module github.com/caddyserver/forwardproxy@latest found (v0.0.0-20191002195248-247c0bafaabd, replaced by ./forwardproxy), but does not contain package github.com/caddyserver/forwardproxy 2020/07/18 04:08:08 [INFO] Cleaning up temporary folder: /tmp/buildenv_2020-07-18-0408.627660925 2020/07/18 04:08:08 [FATAL] exit status 1
Originally posted by @NetHeritage in https://github.com/klzgrad/naiveproxy/issues/96#issuecomment-660420920
Use ~/go/bin/xcaddy build --with github.com/caddyserver/forwardproxy=$PWD/forwardproxy.
root@naiveproxy-caddy2:~# ~/go/bin/xcaddy build --with github.com/caddyserver/forwardproxy=./forwardproxy 2020/07/18 04:08:06 [INFO] Temporary folder: /tmp/buildenv_2020-07-18-0408.627660925 2020/07/18 04:08:06 [INFO] Writing main module: /tmp/buildenv_2020-07-18-0408.627660925/main.go 2020/07/18 04:08:06 [INFO] Initializing Go module 2020/07/18 04:08:06 [INFO] exec (timeout=10s): /usr/bin/go mod init caddy go: creating new go.mod: module caddy 2020/07/18 04:08:06 [INFO] Replace github.com/caddyserver/forwardproxy => ./forwardproxy 2020/07/18 04:08:06 [INFO] exec (timeout=10s): /usr/bin/go mod edit -replace github.com/caddyserver/forwardproxy=./forwardproxy 2020/07/18 04:08:06 [INFO] Pinning versions 2020/07/18 04:08:06 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/caddyserver/caddy/v2 2020/07/18 04:08:07 [INFO] Build environment ready 2020/07/18 04:08:07 [INFO] Building Caddy 2020/07/18 04:08:07 [INFO] exec (timeout=0s): /usr/bin/go build -o /root/caddy -ldflags -w -s -trimpath go: finding github.com/caddyserver/forwardproxy latest build caddy: cannot load github.com/caddyserver/forwardproxy: module github.com/caddyserver/forwardproxy@latest found (v0.0.0-20191002195248-247c0bafaabd, replaced by ./forwardproxy), but does not contain package github.com/caddyserver/forwardproxy 2020/07/18 04:08:08 [INFO] Cleaning up temporary folder: /tmp/buildenv_2020-07-18-0408.627660925 2020/07/18 04:08:08 [FATAL] exit status 1
Originally posted by @NetHeritage in https://github.com/klzgrad/naiveproxy/issues/96#issuecomment-660420920