有谁知道为什么我无法在本地运行 go-getting-started 应用程序?
go get github.com/heroku/go-getting-started/cmd/...
cd $env:GOPATH/src/github.com/heroku/go-getting-started
PS C:\Users\XXXX\gocode\src\github.com\heroku\go-getting-started> heroku local
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[OKAY] Trimming display Output to 107 Columns
11:28:05 PM web.1 | 'go-getting-started' is not recognized as an internal or external command,
11:28:05 PM web.1 | operable program or batch file.
[DONE] Killing all processes with signal null
11:28:05 PM web.1 Exited Abnormally
PS C:\Users\XXXX\gocode\src\github.com\heroku\go-getting-started> code .
最佳答案
If you see an error about an unrecognized command or “command not found”, then $GOPATH/bin is likely not in your $PATH or the trailing ... was missing from the go get github.com/heroku/go-getting-started/.... command used during “Prepare the App”.
确保 $GOPATH/bin
(在你的例子中,C:\Users\XXXX\gocode\bin
)在你的 $PATH
中> 变量。服务器二进制文件 go-getting-started
已经存在,您只需将其提供给命令行即可。
关于Heroku go-getting-started 不在本地运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36730686/