Google app engine 在Google云平台上部署Vue构建

Google app engine 在Google云平台上部署Vue构建,google-app-engine,google-cloud-platform,bucket,Google App Engine,Google Cloud Platform,Bucket,我正在从我的vue app文件夹中运行命令gcloud app deploy,在上次收到vue cli错误时,为其附加了快照 您正在尝试在GAE Google应用程序引擎上部署该应用程序吗 如果是,则可能会因为GAE与nodejs npm不兼容而导致错误,如果希望以这种方式使用Vue,则需要在GAE flex中部署它 另一个选项是,构建vue应用程序并使用另一个运行时部署它,例如:python服务器;将生成用作静态站点。似乎没有安装vue cli服务。如果有帮助,这是my cloudbuild.

我正在从我的vue app文件夹中运行命令gcloud app deploy,在上次收到vue cli错误时,为其附加了快照


您正在尝试在GAE Google应用程序引擎上部署该应用程序吗

如果是,则可能会因为GAE与nodejs npm不兼容而导致错误,如果希望以这种方式使用Vue,则需要在GAE flex中部署它


另一个选项是,构建vue应用程序并使用另一个运行时部署它,例如:python服务器;将生成用作静态站点。

似乎没有安装vue cli服务。如果有帮助,这是my cloudbuild.yaml 步骤:

app.yaml:

runtime: nodejs12
handlers:
  # Serve all static files with urls ending with a file extension
- url: /(.*\..+)$ 
  static_files: dist/\1
  upload: dist/(.*\..+)$  # catch all handler to index.html
- url: /.*
  static_files: dist/index.html
  upload: dist/index.html
注意:如果您的package.json不在存储库根目录中,则应在npm命令中将set定义为:

    - name: node
      entrypoint: npm
   # --prefix and path:
      args: ['install','--prefix','myapp']
如果app.yaml不在根目录中,则在gcloud中部署:

- name: "gcr.io/cloud-builders/gcloud"
  args: ["app", "deploy","myapp/app.yaml"]

欢迎来到SO!请不要将文本作为图像发布,而是将其复制粘贴到您的文章中并相应设置格式。谢谢。请让你的问题有价值,这样每个人都能从问题和答案中受益。截图链接中断或被删除,使您的问题在将来变得毫无价值或令人困惑。是的,我正在GAE上部署该应用程序。我会用GAE flex试试。下面是我的app.yaml文件,运行时:nodejs env:flex api|u version:1 threadsafe:true handlers:-url:/.*.js | css | png | jpg | svg | ttf | ico | manifest$static|u files:dist/\1 upload:dist/.*.js css | png | svg | ttf$url:/.*静态文件:dist/index.html上传:dist/index.htmlI没有发现你的应用程序有任何错误,如果你能尝试GAE flex,请告诉我这是否解决了问题
- name: "gcr.io/cloud-builders/gcloud"
  args: ["app", "deploy","myapp/app.yaml"]