ponzu-cms / ponzu

Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
https://docs.ponzu-cms.org
BSD 3-Clause "New" or "Revised" License
5.68k stars 387 forks source link

error command ponzu on windows 10 #290

Closed mytrix-technology closed 5 years ago

mytrix-technology commented 5 years ago

I have error after install ponzu CLI "'ponzu' is not recognized as an internal or external command, operable program or batch file."

my GOPATH : echo %GOPATH% E:\laragon\usr\go

my GOROOT : echo %GOROOT% E:\laragon\bin\go\go1.9.2

Can anybody solve my problem?? Thanks

sirikon commented 5 years ago

Some questions to be sure that everything is fine:

mytrix-technology commented 5 years ago
  • Did the Ponzu CLI installation process returned any errors?

  • Did you try to run ponzu after closing and re-opening your terminal? (Even all of your open terminals, some times Windows is just weird)

  • Is $GOPATH/bin (Or E:\laragon\usr\go\bin) in your PATH environment variable on Windows?.

  • Can you see ponzu executable inside $GOPATH/bin ?.

Did the Ponzu CLI installation process returned any errors?

No Did you try to run ponzu after closing and re-opening your terminal? (Even all of your open terminals, some times Windows is just weird) Yes I did Is $GOPATH/bin (Or E:\laragon\usr\go\bin) in your PATH environment variable on Windows?. Yes it is Can you see ponzu executable inside $GOPATH/bin ?. Yes I can see the ponzu executable.

But the problem is there is no ponzu executable on $GOROOT/bin. After I put the executable on $GOROOT/bin, the command "ponzu" was run.

nilslice commented 5 years ago

Hi @mytrix-technology - would you try running the go get again, but hand-type (don't copy/paste) the last ... characters into the windows terminal?

go get -u github.com/ponzu-cms/ponzu/...

I think I have heard an issue before where the ... is copied on Windows as a unicode character and thus not properly interpreted by the go tool

ahu commented 5 years ago

I have the same issue on macOS too. I tried several times and never see the ponzu under the bin folder.

I resolve this by cd into ponzu and run go install ./.... Then the executable ponzu is available.

nilslice commented 5 years ago

@mytrix-technology @ahu - this may be related to the regression introduced (and now solved) in recent Go versions:

https://github.com/golang/go/issues/29241

Try upgrading to the latest version of Go, hopefully it will fix this issue.

yanshah commented 5 years ago

just delete the 3 dots and retype it , it will work on windows

nilslice commented 5 years ago

confirmed @yanshah's solution is correct. thank you!