Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot do --run with go1.11 using go mod under windows. #217

DarthPestilane opened this issue Sep 21, 2018 · 17 comments

Cannot do --run with go1.11 using go mod under windows. #217

DarthPestilane opened this issue Sep 21, 2018 · 17 comments


Copy link

@DarthPestilane DarthPestilane commented Sep 21, 2018

------------ directory:
-- main.go
-- go.mod


package main

import "fmt"

func main() {

start realize:

realize start --run --nc

error shows:

[10:54:52][TEST] : Watching 1 file/s 0 folder/s
[10:54:52][TEST] : Install started
[10:54:52][TEST] : Install
 exec: not started

But when I remove go.mod, everything works fine.

Copy link
Contributor Author

@DarthPestilane DarthPestilane commented Sep 21, 2018

realize version: 2.0.3

Copy link

@chrisgoffinet chrisgoffinet commented Sep 23, 2018

Ok, glad I wasn't the only one experiencing this. I was going mad trying to figure out why this tool wouldnt work :)

Copy link
Contributor Author

@DarthPestilane DarthPestilane commented Sep 28, 2018

And it's not only for windows, but mac also. Please fix this as soon as possible. Thanks!

Copy link

@dlq84 dlq84 commented Oct 3, 2018

Same on Linux

Copy link

@Nicolab Nicolab commented Oct 14, 2018

Any news?

Copy link

@mikegleasonjr mikegleasonjr commented Oct 15, 2018

If I recall correctly I was able to workaround by trying...

$ GO111MODULE=auto|off|on realize start ...

Can't remember which flag I set for realize to work, try different values to see if it works for you.

Copy link
Contributor Author

@DarthPestilane DarthPestilane commented Oct 16, 2018

I had to go get -d and checkout to v2.0.2 then reinstalled manually.
Finally, it works again.

But realize --version shows Realize version 2.1. Wired.

Copy link

@llonchj llonchj commented Oct 31, 2018

related to #207

Copy link

@mraerino mraerino commented Nov 3, 2018

I'm getting project not found when doing what @DarthPestilane suggested. Any ideas?

Copy link

@asoseil asoseil commented Dec 10, 2018

thanks for the support and for the reports, in the last months we had some company changes but in the first trimester 2019 we will release a new version

Copy link

@zephinzer zephinzer commented Dec 20, 2018

if anyone’s looking for a quick and dirty solution before this is resolved, i’ve put together some shell scripts into a makefile/docker image which you can find at

Copy link

@frederikhors frederikhors commented Dec 28, 2018

@asoseil everything ok? Is this project still alive?

Copy link

@frederikhors frederikhors commented Dec 28, 2018

@ALL, Any workaround on this until new version will fix?

Copy link

@evshiron evshiron commented Jan 31, 2019

I came up with this issue as well and worked out a solution. realize executes go install to rebuild your project into $GOPATH/bin first before actually running it. When you are using go modules, go install fails because there is no longer $GOPATH, thus "exec: not started".

As a workaround, you can modify your .realize.yaml like this:

    status: true
    method: go build -o <path/to/built/binary>
    status: true
    method: <path/to/built/binary>
Copy link

@xiangrui-zeng xiangrui-zeng commented Oct 29, 2019

I happened to the same issue. Finally, I realized that the trash .go file was the troublemaker.
I used the feature of VSCode to generate history file to .history folder.
Inside .history folder there are a lot of .go files. After I added .history to ignore list (.realize.yaml). Everything works well.
if someone also using the feature of VScode, you could have a try.

    - go
    - /
      - .git
      - .realize
      - vendor
      - .history
Copy link

@chenyongze chenyongze commented Jun 28, 2020

➜ xgk-wechat-go-gin git:(master) realize s
[07:36:42][REALIZE] : Started on localhost:5002
⇨ http server started on
[07:36:42][XGK-WECHAT-GO-GIN] : Watching 12 file/s 13 folder/s
[07:36:42][XGK-WECHAT-GO-GIN] : Command "pkill xgk-wechat-go-gin"

[07:36:42][XGK-WECHAT-GO-GIN] : Install started
[07:36:44][XGK-WECHAT-GO-GIN] : Install completed in 1.574 s
[07:36:44][XGK-WECHAT-GO-GIN] : Running..
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x10cbc0b]

goroutine 14 [running]:
os.(*Process).signal(0x0, 0x16745a0, 0x19b8a60, 0x0, 0x0)
/usr/local/opt/go/libexec/src/os/exec_unix.go:56 +0x3b
/Users/yongze/go/src/ +0x5c*Project).run(0xc0001e8000, 0xc00015d140, 0x11, 0xc000288540, 0xc00014a4e0, 0x166fa40, 0xc000496020)
/Users/yongze/go/src/ +0xc2d*Project).Reload.func3(0xc0001e8000, 0xc000288540, 0xc00014a4e0)
/Users/yongze/go/src/ +0x147
created by*Project).Reload
/Users/yongze/go/src/ +0x297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet