我正在尝试将Node.js应用程序部署到GCP应用程序引擎,但是由于模块的原因,构建失败。有问题的模块是“ link-module-alias”。我尝试删除yarn.lock以重新安装模块。
有人可以指出我在做什么错吗?
Step #1: INFO[0028] Taking snapshot of full filesystem...
Step #1: INFO[0038] RUN yarn install --production || ((if [ -f yarn-error.log ]; then cat yarn-error.log; fi) && false)
Step #1: INFO[0038] cmd: /bin/sh
Step #1: INFO[0038] args: [-c yarn install --production || ((if [ -f yarn-error.log ]; then cat yarn-error.log; fi) && false)]
Step #1: yarn install v1.21.0
Step #1: $ command -v link-module-alias && link-module-alias clean || true
Step #1: [1/5] Validating package.json...
Step #1: [2/5] Resolving packages...
Step #1: [3/5] Fetching packages...
Step #1: info fsevents@1.2.9: The platform "linux" is incompatible with this module.
Step #1: info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
Step #1: [4/5] Linking dependencies...
Step #1: [5/5] Building fresh packages...
Step #1: $ link-module-alias
Step #1: /bin/sh: 1: link-module-alias: not found
Step #1: error Command failed with exit code 127.
Step #1: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Step #1: error building image: error building stage: waiting for process to exit: exit status 1
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/kaniko-project/executor@sha256:f87c11770a4d3ed33436508d206c584812cd656e6ed08eda1cff5c1ee44f5870" failed: exit status 1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ERROR: Cloud build failed. Check logs at https://console.cloud.google.com/gcr/builds/dd154faf-df52-4c34-9008-b3b963c15756?project=491794690190 Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details
答案 0 :(得分:0)
您是否尝试过使用
看看你得到什么。 kaniko github页面上的其他一些示例示例可能会有所帮助。参见:https://github.com/GoogleContainerTools/kaniko