I have a public facing front end React CR service and a private Express backend CR service that serves a bunch of REST APIs. I am following this link to setup service to service communication between them.
Note:- There is no custom configuration on either of the Cloud Run Services. It is mostly the OOB default settings like using default compute engine service account.
I am getting the below error (from cloudbuild trigger) in the front end service. It seems the error is coming from google-auth-library. It is still a JS library so i am assuming it will work with React?
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1
ERROR
Finished Step #0
Step #0: The command '/bin/sh -c npm run build' returned a non-zero code: 1
Step #0:
Step #0:
Step #0: Module not found: Error: Can't resolve 'fs' in '/app/node_modules/google-auth-library/build/src/auth'
Step #0:
Step #0: Failed to compile.
Step #0:
Step #0: go away.
Step #0: your devDependencies to work around this error. This will make this message
Step #0: ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
Step #0: is not maintianed anymore. It is thus unlikely that this bug will
Step #0: babel-preset-react-app is part of the create-react-app project, which
Step #0:
Step #0: node_modules folder for unrelated reasons, but it may break at any time.
Step #0: "@babel/plugin-proposal-private-property-in-object" is already in your
Step #0: declaring it in its dependencies. This is currently working because
Step #0: "@babel/plugin-proposal-private-property-in-object" package without
Step #0: One of your dependencies, babel-preset-react-app, is importing the
Step #0: Creating an optimized production build...
Step #0:
Step #0: > react-scripts build