Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 错误:生成步骤0“;gcr.io/cloud builders/docker“;失败:退出状态1_Google Cloud Platform_Bitbucket_Google Cloud Storage_Gcloud_Bitbucket Api - Fatal编程技术网

Google cloud platform 错误:生成步骤0“;gcr.io/cloud builders/docker“;失败:退出状态1

Google cloud platform 错误:生成步骤0“;gcr.io/cloud builders/docker“;失败:退出状态1,google-cloud-platform,bitbucket,google-cloud-storage,gcloud,bitbucket-api,Google Cloud Platform,Bitbucket,Google Cloud Storage,Gcloud,Bitbucket Api,我正试图使用bitbucket管道在google cloud bucket中部署我的第一个应用程序,但在google cloud console中出现以下错误 ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: exit status 1 ERROR The command '/bin/sh -c yarn install --production || ((if [ -f yarn-error.log ]; then cat y

我正试图使用bitbucket管道在google cloud bucket中部署我的第一个应用程序,但在google cloud console中出现以下错误

ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: exit status 1
ERROR
The command '/bin/sh -c yarn install --production || ((if [ -f yarn-error.log ]; then cat yarn-error.log; fi) && false)' returned a non-zero code: 1
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Found incompatible module
error acp-web@1.0.0: The engine "node" is incompatible with this module. Expected version "9.11.1". Got "9.11.2"
[1/5] Validating package.json...
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
yarn install v1.15.2
---> Running in c25c801a41d0
Step 5/6 : RUN yarn install --production || ((if [ -f yarn-error.log ]; then cat yarn-error.log; fi) && false)
---> 9a31a847bb75
[...]
基本上,我在React Js中有一个应用程序需要部署在google cloud中,我已经成功地解决了所有的bug,但目前我还不知道问题出在哪里

比特桶管道.yml

image: node:10.15.1

pipelines:
  default:
    - step:
        name: Build and Test
        script:
          - npm install
          - npm test
    - step:
        name: Deploy
        script:
          - pipe: atlassian/google-app-engine-deploy:0.2.1
            variables:
              KEY_FILE: $KEY_FILE
              PROJECT: '[project-name] is here'
env: flex
runtime: custom
api_version: 1
threadsafe: true
handlers:
- url: /(.*\.(html|css|js|png|jpg|woff|json))
  static_files: dist/\1
  upload: dist/(.*\.(html|css|js|png|jpg|woff|json))
- url: /.*
  static_files: dist/index.html
  upload: dist/index.html
- url: /
  static_dir: build
skip_files:
- node_modules/
- ^\.git/.*
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$
- ^(.*/)?.*\.bak$
应用程序yaml

image: node:10.15.1

pipelines:
  default:
    - step:
        name: Build and Test
        script:
          - npm install
          - npm test
    - step:
        name: Deploy
        script:
          - pipe: atlassian/google-app-engine-deploy:0.2.1
            variables:
              KEY_FILE: $KEY_FILE
              PROJECT: '[project-name] is here'
env: flex
runtime: custom
api_version: 1
threadsafe: true
handlers:
- url: /(.*\.(html|css|js|png|jpg|woff|json))
  static_files: dist/\1
  upload: dist/(.*\.(html|css|js|png|jpg|woff|json))
- url: /.*
  static_files: dist/index.html
  upload: dist/index.html
- url: /
  static_dir: build
skip_files:
- node_modules/
- ^\.git/.*
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$
- ^(.*/)?.*\.bak$

我只想将此应用程序部署到谷歌云应用程序引擎中

它似乎使用了不正确的node.js版本,如下所示:

error acp-web@1.0.0: The engine "node" is incompatible with this module. Expected version "9.11.1". Got "9.11.2"
不过,您正在管道中指定10.15.1。您能否确保为您的项目应用了正确的版本?

在app.yaml文件中,您需要提到:

runtime: nodejs

在我的例子中,有人在同一个项目中使用纱线和npm。当我进入repo并运行npm安装程序后,它更新了一些软件包,docker的工作流程也很好