本文介绍了goapp serve:不工作,'goapp'不被识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我试图从下面的链接设置本地开发服务器 https://cloud.google.com/appengine/docs / standard / go / tools / using-local-server 使用goapp serve命令时,出现以下错误 错误: 'goapp'不被识别为内部或外部命令,可操作程序或批处理文件。 / strong> 谢谢 解决方案假设您安装了 Google Cloud SDK ,然后按照的指示安装Go引擎,其中包含 gcloud组件安装应用程序引擎链接。 如果您仔细阅读说明,您会发现这一段: Cloud SDK不包括 appcfg 和 goapp 命令。要使用这些命令继续,请参阅下载和安装原始App Engine SDK的步骤。 这意味着如果您要使用 goapp serve ,则需要安装原始App Engine SDK for Go 。可以在相同的页面底部找到安装步骤点击突出显示的文本或者,您可以下载原始的App Engine SDK for Go。 但为了在本地运行您的应用或最终部署到Google Cloud ,您不需要原始SDK 。安装 gcloud 后,您还可以获得 dev_appserver.py 命令,您可以使用此命令而不是 goapp serve 运行本地开发服务器,如下所示: dev_appserver.py /path/to/myapp/app.yml 。请注意: dev_appserver.py 不会运行在App Engine灵活环境中。 Cloud any help me,I am trying to setup local development server from below link https://cloud.google.com/appengine/docs/standard/go/tools/using-local-serverI am getting below errors while using goapp serve command Error:'goapp' is not recognized as an internal or external command,operable program or batch file.Thanks 解决方案 Assuming you've installed the Google Cloud SDK and then you installed the Go appengine with gcloud components install app-engine-go as instructed in this link.If you read through the instructions you'll find this paragraph: Cloud SDK excludes the appcfg and goapp commands. To continue using those commands, see the steps for downloading and installing the original App Engine SDK.That means that if you want to use goapp serve you need to install the original App Engine SDK for Go. Steps for installing it can be found at the bottom of the same page by clicking on the highlighted text "Or, you can download the original App Engine SDK for Go."But to run your app locally or eventually deploying to Google Cloud you don't need the original SDK. Having gcloud installed you also get the dev_appserver.py command, you can use this command instead of goapp serve to run a local development server like so: dev_appserver.py /path/to/myapp/app.yml.Keep in mind that: dev_appserver.py does not run in the App Engine flexible environment. 这篇关于goapp serve:不工作,'goapp'不被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-24 09:47