英文:
Heroku go-getting-started not running localy
问题
有人知道为什么我无法在本地运行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 .
英文:
Does anyone know why i'm unable to run the go-getting-started application localy?
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 .
答案1
得分: 1
根据Heroku开发中心的说明:
> 如果你看到关于未识别命令或“命令未找到”的错误,那么很可能你的$GOPATH/bin不在你的$PATH中,或者在“准备应用程序”期间使用的"go get github.com/heroku/go-getting-started/...."命令中缺少了尾部的...。
确保$GOPATH/bin
(在你的情况下是C:\Users\XXXX\gocode\bin
)在你的$PATH
变量中。服务器二进制文件go-getting-started
已经在那里,你只需要让它在命令行中可用。
英文:
According to the Heroku Dev Center:
> 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”.
Make sure $GOPATH/bin
(in your case, C:\Users\XXXX\gocode\bin
) is in your $PATH
variable. The server binary, go-getting-started
, is already there, you just need to make it available to the command line.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论