我试图使用bitbucket管道在google云桶中部署我的第一个应用程序,但是我在google云控制台中得到了下面的错误。
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应用程序,需要在google云中部署,我已经成功地解决了所有的but,但是现在我还不知道问题出在哪里。
bitbucket-pipeline.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'app.yaml
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$我只想把这个应用部署到google云应用引擎中。
发布于 2019-04-22 21:40:51
它似乎使用了不正确的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。你能确保正确的版本被应用于你的项目吗?
发布于 2020-10-15 17:21:36
在我的例子中,有一些人在同一个项目中使用纱线和npm。一旦我进入回购和运行npm安装,它更新了几个包,然后码头工作流程是好的。
发布于 2020-04-07 23:25:30
在app.yaml文件中,您需要提到:
runtime: nodejshttps://stackoverflow.com/questions/55798565
复制相似问题