As I am running my unit test through bitbucket pipelines, the below error occurs in some of the tests
Uncaught Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.
at GoogleAuth.getApplicationDefaultAsync (node_modules/google-auth-library/build/src/auth/googleauth.js:183:19)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at GoogleAuth.getClient (node_modules/google-auth-library/build/src/auth/googleauth.js:565:17)
at GrpcClient._getCredentials (node_modules/google-gax/src/grpc.ts:202:20)
at GrpcClient.createStub (node_modules/google-gax/src/grpc.ts:404:19)
Please check this for more details Error: Could not load the default credentials in the bitbucket pipelines while using google cloud logging
However, I would like to try this solution https://stackoverflow.com/a/42059661, but I think this could only work if you're doing it manually since you have to choose an email to login with.
I would like to know how to run this command or an alternative command in the bitbucket pipeline that may solve my problem.
Please let me know if you have any other suggestions. Thank you in advance