Cloud Run fails with NODE_ENV=production

I have successful build with NODE_ENV=develop but it fails when I change it to NODE_ENV=production, what can be a reason of it?

 

0 1 316
1 REPLY 1

jkg
Google Developer Expert
Google Developer Expert

Can you provide more information?

Sounds like during the deployment process, there might be an environment variable being checked for which is present in the develop environment, but not in the production environment.

For example, if you provide a database connection string in develop, but not in production, your app may not be able to start because it can't establish a connection to a database meaning your build/deployment would fail.