I am attempting to make a deployment to firebase using cloud build triggers, everything seems to work fine until it reaches the use
command in my cloudbuild.yml
and cannot find the workspace/use
module. Has anyone seen anything like this before?
steps:
- name: 'gcr.io/$PROJECT_ID/latest'
args: ['use', '$_PROJECT_NAME']
secretEnv: ['FIREBASE_TOKEN']
- name: 'gcr.io/cloud-builders/npm'
dir: 'functions'
args: ['install']
- name: 'gcr.io/$PROJECT_ID/firebase'
args: ['deploy']
secretEnv: ['FIREBASE_TOKEN']
images: ['gcr.io/$PROJECT_ID/latest']
secrets:
- kmsKeyName: 'projects/<project_name>/locations/global/keyRings/ci-ring/cryptoKeys/deployment'
secretEnv:
FIREBASE_TOKEN: <token>
Error logs:
starting build "e58cd1fb-83ac-473e-8619-be5993c85ff3"
FETCHSOURCE
Fetching storage object: gs://<project_name>_cloudbuild/source/1611438707.861363-3e7c162fc67f4c0b9265048dc271a97c.tgz#1611438709526281
Copying gs://<project_name>_cloudbuild/source/1611438707.861363-3e7c162fc67f4c0b9265048dc271a97c.tgz#1611438709526281...
/ [0 files][ 0.0 B/ 3.8 MiB]
/ [1 files][ 3.8 MiB/ 3.8 MiB]
Operation completed over 1 objects/3.8 MiB.
BUILD
Starting Step #0
Step #0: Pulling image: gcr.io/<project_name>/latest
Step #0: Using default tag: latest
Step #0: latest: Pulling from <project_name>/latest
Step #0: cbdbe7a5bc2a: Already exists
Step #0: f98f8aade4b1: Pulling fs layer
Step #0: 6c9c37ffd044: Pulling fs layer
Step #0: 003e8eba0035: Pulling fs layer
Step #0: 66809d8b3441: Pulling fs layer
Step #0: b433e12bb2bb: Pulling fs layer
Step #0: e41dc8d53a22: Pulling fs layer
Step #0: a5334e5fd71b: Pulling fs layer
Step #0: 0555f0644d57: Pulling fs layer
Step #0: 66809d8b3441: Waiting
Step #0: b433e12bb2bb: Waiting
Step #0: e41dc8d53a22: Waiting
Step #0: a5334e5fd71b: Waiting
Step #0: 7531da0f40aa: Pulling fs layer
Step #0: 0555f0644d57: Waiting
Step #0: 7531da0f40aa: Waiting
Step #0: 003e8eba0035: Download complete
Step #0: 6c9c37ffd044: Verifying Checksum
Step #0: 6c9c37ffd044: Download complete
Step #0: 66809d8b3441: Download complete
Step #0: e41dc8d53a22: Verifying Checksum
Step #0: e41dc8d53a22: Download complete
Step #0: a5334e5fd71b: Verifying Checksum
Step #0: a5334e5fd71b: Download complete
Step #0: b433e12bb2bb: Verifying Checksum
Step #0: b433e12bb2bb: Download complete
Step #0: f98f8aade4b1: Verifying Checksum
Step #0: f98f8aade4b1: Download complete
Step #0: 7531da0f40aa: Verifying Checksum
Step #0: 7531da0f40aa: Download complete
Step #0: 0555f0644d57: Download complete
Step #0: f98f8aade4b1: Pull complete
Step #0: 6c9c37ffd044: Pull complete
Step #0: 003e8eba0035: Pull complete
Step #0: 66809d8b3441: Pull complete
Step #0: b433e12bb2bb: Pull complete
Step #0: e41dc8d53a22: Pull complete
Step #0: a5334e5fd71b: Pull complete
Step #0: 0555f0644d57: Pull complete
Step #0: 7531da0f40aa: Pull complete
Step #0: Digest: sha256:xxxx
Step #0: Status: Downloaded newer image for gcr.io/qualle-web/latest:latest
Step #0: gcr.io/qualle-web/latest:latest
Step #0: internal/modules/cjs/loader.js:983
Step #0: throw err;
Step #0: ^
Step #0:
Step #0: Error: Cannot find module '/workspace/use'
Step #0: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
Step #0: at Function.Module._load (internal/modules/cjs/loader.js:862:27)
Step #0: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
Step #0: at internal/main/run_main_module.js:18:47 {
Step #0: code: 'MODULE_NOT_FOUND',
Step #0: requireStack: []
Step #0: }
Finished Step #0
ERROR
ERROR: build step 0 "gcr.io/<project_name>/latest" failed: step exited with non-zero status: 1
question from:
https://stackoverflow.com/questions/65864880/cannot-find-module-workspace-use-on-cloudbuild 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…